void SolveTowers(int Count, char Source, char Destination, char Spare) { if (Count == 1) { cout << "Move top disk from pole " << Source << " to pole " << Destination << endl; } else { SolveTowers(Count-1, Source, Spare, Destination); // X SolveTowers(1, Source, Destination, Spare); // Y SolveTowers(Count-1, Spare, Destination, Source); // Z } // end if } // end SolveTowers