#include #include "Hanoi.h" //#include "Hanoi.cpp" //remove for ecc lab using namespace std; main() { Hanoi towers; int disks; char a = 'a', b = 'b', c = 'c'; cout << "Program solves the Towers of Hanoi for 1 to 9 disks." << endl; cout << "Tower 'A' is source, tower 'B' is destination and tower 'C' is spare." << endl; towers.displayTowers(); do { cout << "\nEnter number of disks (0 to quit): " << flush; cin >> disks; if(disks == 0) exit(1); if(disks < 10 && disks > 0) { towers.fillTowers(disks); towers.displayTowers(); cout << towers.solveTowers(disks, a, b, c) << flush; //(source, destination, spare) cout << " moves were required to solve this puzzle." << endl; } else cout << "Invalid number of disks." << endl; } while(1); }