Assignment #114 BasicNestedLoops
Code
/// Name: Lacey Reese
/// Period: 5
/// Program Name: MultiplicationTable
/// File Name: MultiplicationTable.java
/// Date Finished 4/26/2016
public class MultiplicationTable
{
public static void main(String[] args)
{
for ( int i=0; i< 13; i++ ) {
if ( i == 0 ) {
System.out.println( "x | 1\t2\t3\t4\t5\t6\t7\t8\t9" );
System.out.println( "==+==================================================" );
}
System.out.print( i + " | " );
for ( int n=1; n< 10; n++ ) {
System.out.print( i*n+ "\t" );
}
System.out.print("\n");
}
}
}
Picture of the output