//Display the factorial of a number using for loop
#include<stdio.h>
int main()
{
int n,i,ft=1;
printf("Enter n= ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
ft=ft*i;
}
printf("\nFactorial of %d= %d",n,ft);
return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: