//Downloaded From theonlinetutorials.com
//Source code
#include"stdio.h"
#include"conio.h"
int fac(int n){
if(n<0)
return 0;
if(n==1||n==0)
return 1;
else
return n*fac(n-1);
}
int main()
{
int n=5;
int i;
printf("Enter the no to find the factorail \n");
scanf("%d",&n);
printf("Factorail of the no is %d ",fac(n));
getch();
return 0;
}
Not Satisfied ? Just search & get the result
Related posts:
