Assignement: Displaying multiplication tables up to 12
Code
/// Name: Sean Harrison
/// Period: 7
/// Program name: MultiplesDisplay
/// File Name: MultiplesDisplay.java
/// Date Finished: 4/23/2016
import java.util.Scanner;
public class MultiplesDisplay
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int number, product;
System.out.print( "Choose a number: " );
number = keyboard.nextInt();
for ( int x = 1; x <=12; x++ )
{
product = number*x;
System.out.println( number + "x" + x + " = " + product );
}
}
}
Picture of the output