Fórmula de fatorial
return n * factorial(n-1)
Tough Tarsier
return n * factorial(n-1)
factorial formula
n! = n * ( n - 1 ) *...*1
unsigned long long factorial(unsigned long long num){
if(num<=0)
return 1;
return num * factorial(num-1);
}