Code:
register int count; // declare the first counter  
int iCount;	// declare the second counter	
long factorial; // Declare the var for output 
printf("Compute the factorial of what number?");   // display message to user
scanf("%d",&iCount); // Get the input from user
// Loop through to multiply the numbers to calc fact
for (factorial =1L, count=1; count<=iCount; count++)
	factorial *=count;
printf("%d!=%d\n",iCount, factorial);  // Print output