Answers for "what is the formula for calculate the factorial"

C++
3

formula of factorial

return n * factorial(n-1)
Posted by: Guest on August-03-2021
17

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

Code answers related to "what is the formula for calculate the factorial"

Browse Popular Code Answers by Language