a program to extract numbers from an input stream, compute their product, and display the result. Use the integer 0 as a sentinel.

What will be an ideal response?


```
#include
using namespace std;
int main()
{
int product, item;
product = 1;
cout << "Enter the numbers to multiply. 0 to stop." << endl;
cout << ">>> ";
cin >> item;
while (item != 0) {
product *= item;
cout << ">>> ";
cin >> item;
}
cout << "The product is " << product << endl;
return 0;
}
```

Computer Science & Information Technology

You might also like to view...

Which of the following statements about defining multiple properties on the same field is FALSE?

A) If you save an input mask, the input mask is ignored when you define a format in the field's Format property. B) The data in the table does not change, regardless of how you define the Format property. C) When defining an input mask that differs from the Format property, the Format property takes precedence when the data is displayed. D) The Format property affects how the data is both displayed and stored.

Computer Science & Information Technology

____ is the term for the separation of a service from the entity (or entities) providing that service.

A. Visualization B. Distributed computing C. Virtualization D. Topological change

Computer Science & Information Technology

Which of the following is not a component of project management?

A. goals and objectives B. timeline C. end user evaluation D. resources

Computer Science & Information Technology

A(n) ____________________ is a self-guided training activity which permits a trainee to work through an interactive learning session at their own pace.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology