Assignemnt #113 Basic Nested Loops
Code
///Name: Morgan Kaplan
///Period: 5
///Project Name: Basic Nested Loops
///File Name: BNL.java
public class BNL
{
public static void main( String[] args)
{
for( int x=0; x<= 5; x++)
{
for( int y=0; y<= 5; y++)
{
if(x==0)
{
System.out.print( " (" + x + ", " + y + ") ");
}
if(x==1)
{
System.out.print( " (" + x + ", " + y + ") ");
}
if(x==2)
{
System.out.print( " (" + x + ", " + y + ") ");
}
if(x==3)
{
System.out.print( " (" + x + ", " + y + ") ");
}
if(x==4)
{
System.out.print( " (" + x + ", " + y + ") ");
}
if(x==5)
{
System.out.print( " (" + x + ", " + y + ") ");
}
}
System.out.println(" ");
}
}
}
Picture of Output