// CSE 142, Autumn 2010 // Author: Jessica Miller // This program uses a Scanner to read in two numbers from the user and // calculate their product. The numbers can be typed on the same line // or different lines. import java.util.*; // so that I can use Scanner public class ScannerMultiply { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.print("Please type two numbers: "); int num1 = console.nextInt(); int num2 = console.nextInt(); int product = num1 * num2; System.out.println("The product is " + product); } }