Factorials

Factorials are products of positive integers.

The value "n factorial", written n!, for a whole number n is the product of all the whole numbers from 1 to n.

n! = 1 × 2 × · · · × (n – 2) × (n – 1) × n

For example, 5! is equal to 120:

5! = 1 × 2 × 3 × 4 × 5 = 120

(For various reasons, 0! is defined to be equal to 1, not 0.)