Respuesta :

Answer:

long fact(int n)

{

   if(n<=1)//base case

   return 1;  

   long p=fact(n-1);//recursive call.

   return n*p;//returning the factorial.

}

Explanation:

Above written function is written in C++ language.It is a recursive function to find the factorial of the function.

If we enter a number  equal to  or  less than  1  then the function returns 1. Then the recursive call  is made  and it is stored  in the long  variable  p and  the result is returned as n*p.