Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I will vote lifesaver if program works correctly Write a program that computes t

ID: 3535775 • Letter: I

Question

I will vote lifesaver if program works correctly

Write a program that computes the following summation using a function. a + (a+1)+ + b = Implement the following function in your program int computesum (int a, int b) This function computesum computes the sum of all the integers from a to b. You can compute the sum and and use these to test your program. If your program is correct you should have . Sample execution of the program is given below Enter a and b 5 10 Sum from 5 to 10 is 45 Sum from 1 to 4 is 10 Sum from 1 to 10 is 55

Explanation / Answer

According to the problem, one must find the sum of all numbers in a range including both the terminal numbers. Here's the code I wrote:

01 #include <iostream>