amar singh 0 Newbie Poster
#include<stdio.h>
#include<conio.h>
main()
{
 int a,i,fact=1;
clrscr();
printf("Enter a number ");
scanf("%d",&a);
for(i=1;i<=a;i++)
{
 fact=fact*i;
}
printf("Fact of %d is %d",fact,a);
getch();
}