Assignemnt #111 and NestingLoops
Code
/// Name: Marco Correa
/// Period: 5
/// Program Name: NestingLoops
/// File Name: NestingLoops.java
/// Date Finished: 4/5/2016
import java.util.Scanner;
public class RightTriangle
{
public static void main ( String[] args )
{
Scanner k = new Scanner(System.in);
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();
}
System.out.println( "\n" );
}
}
Picture of the output