#include main() { int n, nfac; printf("\nEnter a number (>= 0): "); scanf("%d", &n); printf("\n %d! = ", n); /* NOTE: The exclamation mark isn't some form of operator, but will be printed. As no carriage return escape operator is employed at the end of the character string, the next printf statement will carry on exactly where this one left off. */ nfac = 1; while (n > 0) { nfac *= n; /* The assignment operators beginning with a mathematical symbol and ending with an equals sign mean that the new definition for the variable being redefined is equal to the variable, affected in some way by another variable. The way in which it is affected is determined by the mathematical symbol at the start of the assignment operator, e.g. nfac *= n means nfac = nfac * n. */ n -= 1; /* Equals n = n - 1. You get the general idea. */ } printf("%d\n", nfac); }