Eg: factorial of 5 is:-
5! = 5 * 4 * 3 * 2 * 1=120
#include<stdio.h>
#include<conio.h>
main()
{
int i,fact=1,n;
clrscr();
printf("Enter number...");
scanf("%d",&n);
for(i=1;i<=n;i++)
fact=fact*i;
printf("facttorialof the given number is...%d",fact);
getch();
}