Write a program that reads in exactly 10 integers and outputs the sum.

What will be an ideal response?


```
#include
//loop to accept 10 integers and sum
int main()
{
using namespace std;
int x, sum = 0;
cout << "Enter 10 integers, each followed by "
<< " I will give the sum." << endl;
for(int i =0; i < 10; i++)
{
cout << "Enter integer " << i << ": ";
cin >> x;
sum = sum + x;
}
cout << "sum: " << sum << endl;
return 0;
}
```

Computer Science & Information Technology

You might also like to view...

Any ________ validation is a way to use an input message to communicate data entry rules and/or expectations to the user

A) input B) data C) value D) text

Computer Science & Information Technology

Write the statement that assigns the string "Treasurer" to the element located in the third row, second column in thestrOfficersarray.

What will be an ideal response?

Computer Science & Information Technology

Bandwidth is the ownership right to an image.

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

Computer Science & Information Technology

In a graph that represents the flight map for the HPAir problem, if a flight exists from city C1 to city C2, then the path from C1 to C2 is called a _______.

a) relation b) neighborhood c) directed path d) connecting path

Computer Science & Information Technology