소개글
하노이타워소스와 실행모습입니다.
목차
하노이 타워 소스프로그램
하노이 타워 실행모습
본문내용
하노이타워 소스프로그램
#include <stdio.h>
hanoi(int n, int start, int end, int temp)
{
if(n==1)
printf("Move %d from %c to %c \n",1,start,end);
else
{
hanoi(n-1, start, temp, end);
printf("Move %d from %c to %c \n",n,start,end);
hanoi(n-1,temp,end,start);
}
return 0;
}
main()
{
int n;
printf("input data number of disk ");
참고 자료
인공지능개론---홍릉과학출판사
c로쓴자료구조론-사이텍미디어