Next: Print backwards
Up: Assignment 2: Recursion
Previous: Assignment 2: Recursion
Last semester, we implemented an iterative version of Euclid's
GCD algorithm, as part of the Rational class. This semester, we
are going to implement the recursive version.
- 1.
- Do Exercise 4 on page 113 of the book. If you want, you can
modify the Rational class to use your version, but whatever you do
you should write some code that tests your implementation for at
least three cases.
Allen B. Downey
1998-09-21