=
Result
INSTRUCTION
In order to calculate the sum of all integer numbers between values Min and Max (inclusive), follow the steps:
Enter the smallest number in text box marked "Min"
Enter the biggest number in text box marked "Max"
Click the on-screen button "=" to get the result
The task could be completed using either the iterations (looping), or by applying the exact formula for arithmetic progression shown below:
SUM = (Min + Max)*(Max-Min+1)/2
For example, the SUM of all integer numbers between 1 and 10 could be calculated as:
SUM = (1 + 10)*(10-1+1)/2 = 55
For practice purpose, check the answer using Excel spreadsheet.