AppleTree iOS

내가 입력한 숫자로 n!만들기! 본문

C 언어

내가 입력한 숫자로 n!만들기!

사과나무 2010. 4. 19. 18:14
#include<stdio.h>
int main()
{
    int n;
    int m=1;
   scanf("%d",&n);
 
    for(;n>=1;n--)
    {
        m*=n;
    }
    printf("%d\n",m);
    return 0;
}

Comments