#include <stdio.h>
#include <conio.h>
int fact(int a)
{
int f;
if(a==1)
return 1;
f=a*fact(a-1);
return f;
}
int main()
{
int a, ans;
printf("Enter number for firctorial: ");
scanf("%d", &a);
printf("Fictorial of %d is %d.", a, fact(a));
getch();
}
#include <conio.h>
int fact(int a)
{
int f;
if(a==1)
return 1;
f=a*fact(a-1);
return f;
}
int main()
{
int a, ans;
printf("Enter number for firctorial: ");
scanf("%d", &a);
printf("Fictorial of %d is %d.", a, fact(a));
getch();
}