C Program to check FACTORIAL
main()
{
int i,j,m,fact,sum=0;
clrscr();
printf("ENTER THE NO.: ");
scanf("%d",&m);
for(i=1;i<=m;i++)
{
fact=1;
for(j=1;j<=i;j++)
{
fact=fact*j;
}
printf(" %d * ",i);
}
sum=sum+fact;
printf(" = %d",sum);
getch();
}
OUTPUT :
ENTER NO: 5
1 * 2 * 3 * 4 * 5 * = 120