// File: inclass26.cpp
// This program solves the Towers of Hanoi problem
// Input:  numDisks, the number of disks to be moved
// Output: a sequence of moves that solve the puzzle
//
// Class: CS 210                     Instructor: Dr. Deborah Hwang
// Assignment: In-class exercise for 4/18/06
// Programmer(s): <fill in your name(s)>
// ----------------------------------------------------------------------

#include <iostream>
using namespace std;

int main()
{
   const char BEGIN_TOWER  = 'A',    // the three towers
              MIDDLE_TOWER = 'B',
              END_TOWER    = 'C';
   int numDisks;                     // the number of disks to be moved

   cout << "This program solves the Hanoi Towers puzzle.\n\n";

   cout << "Enter the number of disks: ";
   cin >> numDisks;
   cout << "The solution for n = " << numDisks << endl;
   Hanoi (numDisks, BEGIN_TOWER, END_TOWER, MIDDLE_TOWER);
}  // end main
