factorialL

Find the factorial of a given number

long long factorial(n);

will return the factorial of a given number. There is no custom return type, the function always returns an integer.

factorialL(5); //120
factorialL(0); //1

Last updated