CS 2401 Quiz #5

Date: Monday, October 3, 2011.

1. Write a recursive method that, given integers m and n, computes the sum m + (m+1) + ... + n. Start by describing a recursive algorithm in plain English, and then transform this algorithm into a method. Trace you method on the example of m = 2 and n = 4.