#include<stdio.h>
#include<conio.h>
void main(){
void hanio(int n,char one,char two,char three);
int m;
printf("input the number of diskes:");
scanf("%d",&m);
printf("The step to movimg %d disks:\n",m);
hanio(m,'A','B','C');
getch();
}
void hanio(int n,char one,char two,char three){
void move(char x,char y);
if(n==1)
move(one,three);
else{
hanio(n-1,one,three,two);
move(one,three);
hanio(n-1,two,one,three);
}
}
void move(char x,char y){
printf("%c --> %c \n",x,y);
}