-----------------------------------------------------------------------
#include<stdio.h>
void hanoi_tower(int n, char from, char tmp, char to)
{
if(n==1)printf("원판 1을 %c 에서 %c으로 옮긴다.\n",from,to);
else{
hanoi_tower(n-1,from,to,tmp);
printf("원판 %d을 %c 에서 %c으로 옮긴다.\n",n,from,to);
hanoi_tower(n-1,tmp,from,to);
}
}
int main()
{
hanoi_tower(3,'A','B','C');
}
-----------------------------------------------------------------------
실행 순서를 모르겠어요 ㅠㅠ
실행결과 3번째 줄에
'원판 1을 C에서 B로 옮긴다'
이게 어떻게 나오는지 알고싶습니다
도와주십쇼 ㅠㅠ