Write a function named intervalSum. This function must not accept arguments but it will ask the user to input two integers m and n and calculate and display the sum of all the integers from min(m, n) to max(m, n). For example, if 4 and 8 were entered the sum to be calculated would be 30. This method must use a loop to repeatedly add numbers to a running total.
1
Expert's answer
2011-02-09T08:17:35-0500
Your question requires more work than to be done for free. You can submit it as an assignment to our control panel set the deadline and our programmers will assist you.
Comments
Leave a comment