/** This was created in class on April 12, 2001. It is an example of a nested loop that prints a simple multiplication table. */ import tio.*; class Mult { public static void main(String[] args) { // get size of table System.out.println("Enter size of table."); int size = Console.in.readInt(); // print top labels int col = 1; while ( col <= size ) { System.out.print("\t" + col); col++; } System.out.println(); for (int rownum = 1; rownum <= size; rownum++) { // print row label System.out.print(rownum + "\t"); //print a row for( int column = 1; column <= size; column++) { System.out.print((column * rownum) + "\t"); } System.out.println(); } } }