Friday, August 26, 2016

uri- 1153 - Simple Factorial

#include<stdio.h>

int main()
{
    int i,n,fac=1;

    scanf("%d",&n);
    for(i=1;i<=n;i++)
        fac=i*fac;
    printf("%d\n",fac);
    return 0;
}

No comments: