Develop
2003.04.23 09:46
[c] 하노이탑 - 재귀함수
Views 9185 Comment 0
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'); }
-
[c++] p.47 연습문제 3번
-
[opengl] 컴퓨터 그래픽스 강의 자료(수업자료)
-
[c] 그래픽스 자료(OpenGL 라이브러리) 샘플 소스
-
[c] 간단한 채팅(클라이언트/서버) 프로그램 소스
-
[c] 팩토리얼.. - 재귀함수
-
[c] 하노이탑 - 재귀함수
-
[c] 소수점 반올림^^
-
[c] 최대공약수 알고리즘 (유클릿)
-
[php] whois정보 조회 프로그램
-
[c] 간단한 링크드 리스트(linked list) 자료형 예제..
-
[c] CGI Library to C^^
-
[c] scanf(), printf() 포맷의 형변환