for(int j=0; j<x-2; j++)
{
System.out.print("*");
for(int k=0; k < x-2; k++)
{
System.out.print(" ");
}
System .out.print("*");
System.out.println();
}
Why does the first loop make a column and the second loop makes a row. I just do not understand nested loops.
Thanks
Edited by Roger, 21 September 2011 - 11:46 AM.
moved + added code tags.


Sign In
Create Account

Back to top










