#include<stdio.h>
int fact(int n)
{
if(n==0){
return 1;
}
else
{
return n*fact(n-1);
}
}
int main()
{
int number,result;
printf("enter the number:\n");
scanf("%d",&number);
result=fact(number);
printf("fact of n:%d",result);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: