#include <stdio.h>
int main()
{
int num,count,fact=1;
printf("Enter a number to find its factorial\n");
scanf("%d",&num);
for(count=1;count<=num;count++)
{
fact=fact*count;
}
printf("factorial of %d is %d\n",num,fact);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: