Assignment #110
Code
/// Name: Mahima Choudhary
/// Period: 6
/// Program Name: Displaying Some Multiples
/// File Name: Multiples.java
/// Date Finished: 2/8/2016
import java.util.Scanner;
public class Multiples
{
public static void main(String[] args)
{
Scanner k = new Scanner(System.in);
int answer;
System.out.print("Choose a number: ");
int number = k.nextInt();
System.out.println();
for (int i = 1; i <= 12; i++){
answer = number * i;
System.out.println(number + "x" + i + " = " + answer);
}
}
}
Picture of the output