C Program for finding the Factorial of a number using recursion
#include<stdio.h>
#include<conio.h>
long int
fact(int n);
void main()
{
int num;
clrscr();
printf("Enter any number for find its
Fatctorial\n");
scanf("%d",&num);
printf("Factorial of %d is
%ld",num,fact(num));
getch();
}
long int
fact(int n)
{
if(n==1)
return 1;
else
return(n*fact(n-1));
}
OUTPUT
You can also visit:-