C Program to find factorial of given number
#include<stdio.h>#include<conio.h>
void main()
{
int n,a,f=1;
clrscr();
printf("Enter any number to find factorial\n");
scanf("%d",&n);
for(a=n;a>1;a--)
f=f*a;
printf("%d",f);
getch();
}
OUTPUT
Enter any number to find factorial5
120
You can also visit:-