factorial of 13 code example
Example 1: calculate factorial
int factorial(int n) {
int res = 1, i;
for (i = 2; i <= n; i++)
res *= i;
return res;
}
Example 2: factorial
unsigned long long factorial(unsigned long long num){
if(num<=0)
return 1;
return num * factorial(num-1);
}