Spring 2006 - In-class exercise for 4/18/06
10 points
This exercise should be completed in pairs. The purpose of this exercise is to continue working with recursive functions.
0. Create a new project, then download file
inclass26.cpp from the course webpage under today's date to
your project folder. This program is an implementation of the main
program that will read in the number of disks and call the function
Hanoi to print out the solution to the Towers of Hanoi
problem for that many disks.
1. (5 points) Add the prototype and a definition for the Hanoi
function developed in lecture. Build and run this program. Make sure
it is correct.
2. (5 points) When you are confident your program works
correctly, answer the following questions:
When you have completed this exercise, print out your
program file and turn it in with one copy of this exercise sheet with
your answers to the questions.