Computer Science, asked by chanakya99, 3 months ago

write a program in c for factorial using recursion with explanation?​

Answers

Answered by MOMINNaveed
0

Explanation:

Factorial Program using recursion in C

#include<stdio.h>

long factorial(int n)

{

if (n == 0)

return 1;

else.

return(n * factorial(n-1));

}

Answered by kalamadhu366
1

Factorial Program using recursion in C

  • include<stdio.h>
  • >long factorial(int n)
  • {
  • (n == 0)
  • return 1
  • else.
  • return(n * factorial(n-1));
Similar questions