111
Code
///Name: Conner Wygaerts
///Period: 6
///Project Name: NestingLoops
///File Name: NestingLoops.java
///Date Finished: 5/3/16
public class NestingLoops
{
public static void main( String[] args )
{
for ( char c='A'; c <= 'E'; c++ )
{
for ( int n=1; n <= 3; n++ )
{
System.out.println( c + " " + n );
}
}
System.out.println("\n");
for ( int a=1; a <= 3; a++ )
{
for ( int b=1; b <= 3; b++ )
{
System.out.print( a + "-" + b + " " );
}
}
System.out.println("\n");
}
}
////variable n changes much faster because it changes 3 times every time c changes
//// output changes by counting numebr then charater, not character then number
////output changes by displaying th enumber pairs vetically rather than horizontally
//// output changes by making it a new line everytime b counts to 3 everytime a changes
Picture of the output