// 汉诺塔
# include < iostream.h >
void hanoi ( int n, char a, char b, char c )
{ if ( n >= 1 )
{ hanoi ( n-1, a, c, b ) ;
cout << a << " --> " << c << endl ;
hanoi ( n-1, b, a, c ) ;
}
}
void main ()
{ int m ;
cout << " Input the number of diskes: " << endl ;
cin >> m ;
hanoi ( m, 'A' , 'B' , 'C' ) ;
}