Factorial Of Number Using Recursion

in Hindi - Factorial Of Number Using Recursion



not yet

Source Code :

RUN#include <stdio.h>
#include <conio.h>
 
void main(){
    
int a,fact;

printf("Enter the number : ");
scanf("%d",&a);

fact=factorial(a);

printf("Factorial of %d is %d",a,fact);
getch ();
}
int factorial (int x)
{
int f;
if(x==1){
return (1);
}
else{
f=x*factorial(x-1);
}
return(f);
}