CMPSC 101 - Loop Worksheet #3 Name -

1. In the right margin, show what output would be displayed by the following program.

#include <iostream>
using namespace std;

int main( )
{
    int number = 10;
    int sum = 0;

    while (number > 0)
    {
        sum = sum + number;
        number--;
        cout << sum << endl;
    }


   return 0;
}