CS 2401 Quiz #5

Date: Tuesday, October 4, 2011.

1. Write a recursive method that, given two integers m < n, computes the sum m2 + (m+1)2 + ... + n2. 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 = 1 and n = 3.