Write a complete program that calculates and prints the product of three integers.

```
// Product.java
// Calculate the product of three integers.
import java.util.Scanner; // program uses Scanner

public class Product {
public static void main(String[] args) {
// create Scanner to obtain input from command window
Scanner input = new Scanner(System.in);

System.out.print("Enter first integer: "); // prompt for input
int x = input.nextInt(); // read first integer

System.out.print("Enter second integer: "); // prompt for input
int y = input.nextInt(); // read second integer

System.out.print("Enter third integer: "); // prompt for input
int z = input.nextInt(); // read third integer

int result = x * y * z; // calculate product of numbers

System.out.printf("Product is %d%n", result);
} // end method main
} // end class Product
```


Enter first integer: 10
Enter second integer: 20
Enter third integer: 30
Product is 6000

Computer Science & Information Technology

You might also like to view...

A function ________ includes the statements that make up the function.

A) definition B) prototype C) call D) heading E) parameter

Computer Science & Information Technology

Consider the Web site for your college department. Not all of the users who visit the site have the same reasons that you do. Identify different groups of users who might come to the site. Hint: there are at least six different groups.

What will be an ideal response?

Computer Science & Information Technology

Which of the following is a recommended switch security best practice?

Computer Science & Information Technology

Use the AutoFit button to make all columns in a table the same width.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology