Assignment 114

code

///Name: Mutsu Osoegawa
///Period: 7
///Project Name: Multiplication Table
///File Name: MultiplicationTable.java
///Date: 4/27/2016

public class MultiplicationTable
{
    public static void main( String[] args )
    {
        System.out.println("x | 1     2     3     4     5     6     7     8     9" );
        System.out.println("==+==================================================" );
        for ( int y = 1; y <= 12; y++ )
        {
            System.out.print( y + " | ");
            for ( int x = 1; x <= 9; x++ )
            {
                int c = x*y;
                if ( c < 10 )
                System.out.print( c + "     " );
                else if ( c > 10)
                System.out.print( c + "    " );
            }
            System.out.print("\n");
        }
    }
}