/* Lesley Hogan * July 24th 2003 * Multiply.java * Multiplication tables */ package net.bunnie.dos; import javax.swing.*; import net.bunnie.*; public class Multiply { public static void main (String[] args) { int times; int totalTimes; int spaces = 5; KeyboardReader r = new KeyboardReader(); System.out.print("Enter the number of times you would like to multiply.\nNumber must be less than 17.\n"); times = r.readInt(); System.out.println(); for (int i = 1; i <= times; i++) { totalTimes = 0; for (int z = 1; z <= i; z++) { totalTimes += i; System.out.print(Format.justify('l', totalTimes, spaces)); //System.out.print(totalTimes + "\t"); } System.out.println(); } } }