Contents

Develop
2003.04.23 09:46

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

Views 9500 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);

?

List of Articles
No. Category Subject Author Date Views
405 Develop git 브런치 배우기 (링크) hooni 2013.07.09 20571
404 System/OS [mac] 컨텍스트(Context) 메뉴 "다음으로 열기" 내용 정리 hooni 2013.07.10 18797
403 Etc 영어의 12 시제 (The twelve tenses of English) hooni 2013.07.12 15699
402 Develop [ios] App States file hooni 2013.07.22 13195
401 Develop [ios] Background 에서 네트워크 사용 file hooni 2013.07.22 11510
400 Develop [ios] 소소한 팁 (Rect,Point,Path,URL 등) hooni 2013.08.08 29457
399 Develop [ios] libxml/tree.h file not found file hooni 2013.08.08 18708
398 Develop [ios] UI컨트롤러 샘플코드 hooni 2013.08.08 15425
397 Develop [ios] 최신 UI 모음.. (나중에 정리할 것) secret hooni 2013.08.09 0
396 Develop 아이 훌레시 작업중 ㅋㅋ secret hooni 2013.08.09 0
395 Etc [web] 제로보드 XE 템플릿에서 if문에 대해서 알아봅시다 hooni 2013.08.16 19814
394 Etc 베지어 곡선 (Bezier curve) file hooni 2013.08.18 221321
Board Pagination Prev 1 ... 60 61 62 63 64 65 66 67 68 69 ... 98 Next
/ 98