Assignment #111 and Nesting Loops

Code

     /// Name: Trent Lane
    /// Period: 6
    /// Program Name: Nesting Loops
    /// Date Finished: 3/10/2016
    
    public class NestingLoops
    {
    	public static void main( String[] args )
    	{
    		    		for ( int n=1; n <= 3; n++ )
            {
                for ( char c='A'; c <= 'E'; c++ )
                {
    				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

Assignment 71