my task is to use a loop,, i need the loop to go till 77777
the problem is that the numbers need to be octagon type.. 1-8 instead of 1-10. i have no idea how to make that conversion. i created 2 loops...
i tried to come up with a code for 2 hours. but no luck
here is my code so far..
class Ex6
{
public static void main(String[] args)
{
int count;
count=0;
while(count<77778)
{
int n1;
n1=0;
while(n1<8)
{
n1=n1+1; }
System.out.println(count+n1);
count=count+1;
}
}
}