/******************************************************************************* Simple times table: This program will prompt the user to input an integer n and then display a times table up to n times n. 12 Nov 07 By Ida Pu, Usama Khan, Remigijus Raisys, Toby Ho, William Oakley ********************************************************************************/ import java.util.Scanner; import java.util.Random; public class timesTable1{ public static void main(String args []) { Scanner keyboard = new Scanner(System.in); /* Random r= new Random(); int n1=1+r.nextInt(10); int n2=1+r.nextInt(10); */ System.out.println("Please input a number"); int n = keyboard.nextInt(); for (int x=1; x<=n; x++) { for (int y=1; y<=n; y++) { System.out.print(x+" times "+y+"="+ x*y +"\t"); } System.out.println(); } System.out.println(); } }