Assignemnt #114: Multiplication Table
Code
/// Name: Kelsey Lieberman
/// Period 5
/// Program Name: MultiplicationTable
/// File Name: MultiplicationTable.java
/// Date Finished: 2/10/2016
public class MultiplicationTable
{
public static void main(String[] args)
{
System.out.println("\nx | 1\t2\t3\t4\t5\t6\t7\t8\t9");
System.out.println("===+==================================================================");
for (int y = 1; y <= 12; y++)
{
if (y < 10)
System.out.print(y + " | ");
else
System.out.print(y + " | ");
for (int x = 1; x <= 9; x++)
System.out.print((x*y) + "\t");
System.out.println();
}
System.out.println();
}
}
Picture of the output