CS201, Spring 2004

1. [D&D] Ex 6.7. This exercise will not be graded.

2. [D&D] (5pt) Ex 6.13(b). First of all, you don't have to use a single statement, e.g. using multiple statements or a method is acceptable. Secondly, write a complete program to test your statement(s). In particular, use a

3. [D&D] (5pt) Ex 6.28 and 6.40. Name the non-recursive version of the GCD method

4. [D&D] Ex 6.39. Note that not only you need to add some output statements, you may also need to add extra parameter(s) to the method. The following is a sample output when calculating the fourth number in the Fibonacci series.

fibo(4)

fibo(3)

fibo(2)

fibo(1)

fibo(0)

fibo(1)

fibo(2)

fibo(1)

fibo(0)

fibo(4) is 3