Assignment #114 Multiplication Table

Code

    /// Name: John Huh
    /// Period: 6
    /// Program Name: Multiplication Table
    /// File Name: xTable.java
    /// Date Finished: 4/20/2016
    
    import java.util.Scanner;
    
    public class xTable
    {
    	public static void main( String[] args ) throws Exception
    	{
            
            Scanner keyboard = new Scanner(System.in);
            
            System.out.println();
            System.out.println( "x | \t 1 \t 2 \t 3 \t 4 \t 5 \t 6 \t 7 \t 8 \t 9" );
            System.out.println( "==+========================================================================" );
            
    		for ( int x=1; x<=12; x++ )
            {
                System.out.print( x + " | \t " );
                
                for ( int y=1; y<=9; y++ )
                {
                    int z = x*y;
                    System.out.print( z + " \t " ); 
                }
                System.out.println();
            }
            System.out.println();
    	}
    }
    

Picture of the output

Assignment 1