Write a program in C++ to read a number n and find out the sum of the integers from 1 to
then from 1 to 3, then 1 to 4, and so on and to display the sum of the integers from 1 to
n.
For example, from
1 to 2 = 1
1 to 3 = 3
1 to 4 = 6
1 to 5 = 10
1 to 6 = 18
Comments