#include <stdio.h>
int m;
int fact(int n)
{
if(n==1||n==0)
return m=1;
else
m=n*fact(n-1);
}
int main()
{
int n;
printf("Enter a number to get it,s factorial:-\t");
scanf("%d",&n);
fact(n);
printf("%d",m);
}
#include <stdio.h>
int m;
int fact(int n)
{
if(n==1||n==0)
return m=1;
else
m=n*fact(n-1);
}
int main()
{
int n;
printf("Enter a number to get it,s factorial:-\t");
scanf("%d",&n);
fact(n);
printf("%d",m);
}
Comments
Post a Comment