Using the statements you wrote in Exercise 2.4, write a complete program that calculates and displays the product of three integers. Add comments to the code where appropriate. [Note: You’ll need to write the necessary using declarations.]
What will be an ideal response?
```
// Calculate the product of three integers
#include
using namespace std;
// function main begins program execution
int main()
{
int x; // first integer to multiply
int y; // second integer to multiply
int z; // third integer to multiply
int result; // the product of the three integers
cout << "Enter three integers: "; // prompt user for data
cin >> x >> y >> z; // read three integers from user
result = x * y * z; // multiply the three integers; store result
cout << "The product is " << result << endl; // print result; end line
} // end function main
```
You might also like to view...
How do cloud services make DLP more difficult? How can customers wishing to enforce DLP mitigate this issue?
What will be an ideal response?
Which of the following rules defines character encoding in every Cascading Style Sheets (CSS) document??
A. ?@charset="encoding" B. ?@charset "encoding"; C. ?&char="encoding"; D. ?&char "encoding";