Algorithms_Hanoi
#include "stdio.h" void Hanoi(char a,char b,char c,int n); void main() { Hanoi('A','B','C',3); } void Hanoi(char a,char b,char c,int n) { if(n==1) printf("%c -> %c\n",a,c); else { Hanoi(a,c,b,n-1); printf("%c -> %c\n",a,c); Hanoi(b,a,c,n-1); } }