Answers for "factorial 5"

C++
14

calculate factorial

int factorial(int n) {
	int res = 1, i; 
    for (i = 2; i <= n; i++) 
        res *= i; 
    return res; 
}
Posted by: Guest on May-02-2020
2

factorial

unsigned long long factorial(unsigned long long num){

    if(num<=0)
        return 1;

    return num * factorial(num-1);
}
Posted by: Guest on December-28-2020
0

how to factorise

print ("bum hole")
Posted by: Guest on September-20-2020

Browse Popular Code Answers by Language