Explore BrainMass

Explore BrainMass

    The output of this program for the given input

    Not what you're looking for? Search our solutions OR ask your own Custom question.

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

    See attach file.

    © BrainMass Inc. brainmass.com December 24, 2021, 5: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