#include <iostream.h>
#include <conio.h>
void Tower(int, char, char, char);
void main()
{
clrscr();
int num;
cout << " Hanoy Towers : " << endl
<< " Enter Size of Tower: ";
cin >> num ;
Tower(num,'A','C','B');
getch();
}
void Tower(int n, char A, char C, char B)
{
if(n>1) Tower(n-1,A,B,C);
cout << A << " moved to " << C << endl;
if(n>1) Tower(n-1,B,C,A);
}