Assignment 114
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 x = 1; x <= 12; x++)
{
System.out.print(x+ " ");
if (x / 10 < 1)
System.out.print(" " );
System.out.print("| ");
for (int y = 1; y <= 9; y++)
{
System.out.print((x * y)+ " ");
if ((x * y) / 100 < 1)
System.out.print(" " );
if ((x * y) / 10 < 1)
System.out.print(" " );
}
System.out.println();
}
}
}