#include "iostream.h"
void main()
{void hanoi(int num,char a,char b,char c);
int num;
cout<<"Please input num=";
cin>>num;
hanoi(num,'a','b','c');
}
void hanoi(int n,char a,char b,char c)
{
if(n==1)
cout<<"Move Disc No:"<<n<<"from pile"<<a<<"to "<<c<<endl;
else
{
hanoi(n-1,a,c,b);
cout<<"Moce Disc No:"<<n<<"from pile"<<a<<"to"<<c<<endl;
hanoi(n-1,b,a,c);
}
}