Question: I need help with this C++ assignment. Create a program which will implement the sum of the numbers between 1 and n where n is

I need help with this C++ assignment.

Create a program which will implement the sum of the numbers between 1 and n where n is an integer. When completed, the program will allow the user to input a positive integer (n) then the program will add all numbers between 1 and n (including n) and output the sum. For example, if the user enters 8 then the program will sum the numbers 1 through 8 and will output the sum.

Test your program with the following inputs:

a. 8 (sum is 36)

b. 75 (sum is 2850)

c. 100 (sum is 5050)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!