Write, compile, and execute a C++ program to calculate the sum of the numbers from 1 to 100. The formula for calculating this sum is sum = (n/2)(2*a + (n-1)d), where n = number of terms to be added, a = the first number, and d= the difference between each number. Your program should produce the display

The sum of the number is xxxx.

where the xxxx represents a field width of four digits and should be replaced by the sum computer by the program.

## mike_2000_17 2,669

## NathanOliver 429

triumphost
commented:
Lol. I like this quote. Stealing it! +8