Explore BrainMass

Explore BrainMass

    The output of this program for the given input

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    See attach file.

    © BrainMass Inc. brainmass.com March 4, 2021, 6:10 pm ad1c9bdddf
    https://brainmass.com/computer-science/control-structures/output-program-given-input-32514

    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.49

    ADVERTISEMENT