Share
Explore BrainMass

The output of this program for the given input

See attach file.

Attachments

Solution Preview

#include < iostream >

using namespace std;
int main()
{
int total = 0,
count = 0, number;
do
{ cin >> number;
total = total + number; //---------- (1)
count++;
}
while (number != -1);

cout << "The number of data read is " << count << endl; ...

Solution Summary

The output of this program for the given input is determined.

$2.19