1 // Calculate the product of three integers
2 #include <iostream> // allows program to perform input and output
3
4 using std::cout; // program uses cout
5 using std::cin; // program uses cin
6 using std::endl; // program uses endl
7
8 // function main begins program execution
9 int main()
10 {
11 int x; // first integer to multiply
12 int y; // second integer to multiply
13 int z; // third integer to multiply
14 int result; // the product of the three integers
15
16 cout << "Enter three integers: "; // prompt user for data
17 cin >> x >> y >> z; // read three integers from user
18 result = x * y * z; // multiply the three integers; store result
19 cout << "The product is " << result << endl; // print result; end line
20
21 return 0; // indicate program executed successfully
22 } // end function main