Tower of Hanoi - Recursive
#include<stdio.h>
void move(int n, char from, char to, char c)
{
if(n>0){
move(n-1,from,c,to);
printf("%d 디스크를 %c에서 %c로 이동n",n,from,to);
move(n-1,c,to,from);
}
}
void main()
{
int n;
printf("몇개의 디스크 입니까? : ");
scanf("%d",&n);
move(n,'L','R','C');
}