Develop
2003.04.23 09:46

[c] 팩토리얼.. - 재귀함수

Views 9500 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
#include<stdio.h>
int factorial(int num){
    if(num==1){
        return 1;
    }else{
        num*=factorial(num-1);
        return num;
    }
}

void main(){
    int num,result;

    printf("Enter a number : ");
    scanf("%d",&num);
    result=factorial(num);
    printf("n%d's factorial is %d !!n", num, result);
?

  1. [c] CGI Library to C^^

  2. [c] 간단한 링크드 리스트(linked list) 자료형 예제..

  3. [php] whois정보 조회 프로그램

  4. [c] 최대공약수 알고리즘 (유클릿)

  5. [c] 소수점 반올림^^

  6. [c] 하노이탑 - 재귀함수

  7. [c] 팩토리얼.. - 재귀함수

  8. [c] 간단한 채팅(클라이언트/서버) 프로그램 소스

  9. [sql] 간단한 SQL 문법 정리

  10. [c] 그래픽스 자료(OpenGL 라이브러리) 샘플 소스

  11. [opengl] 컴퓨터 그래픽스 강의 자료(수업자료)

  12. [c++] p.47 연습문제 3번

  13. [c++] p.58 연습문제 2번

  14. [c++] p.118 확인학습 5번

  15. [c] 프로그래밍 ppt, 스킬업 (비트 수업자료)

  16. [linux] 콘솔/Xwindow 에서 PC스피커 소리 없애기

Board Pagination Prev 1 2 3 4 5 ... 74 Next
/ 74