--Originally published at Programming in C++
Program:
For this program we have to ask for two range of numbers and the we are going to add the numbers that are in the range.
For this we use a “for”. With the loop “for” we have to put the integer, then the condition, and lastly we sum 1. What this is going is add a number to the variable until it satisfy the condition we put, so it will run for a certain amount of times.