Given a positive number n, the factorial of that number, denoted n!, is equal to 1 × 2 × ... × (n-1) × n. It can also be computed recursively: n! = n × (n-1)!, for all n greater than or equal to zero.
For example,
3! = 3 × 2! = 3 × 2 × 1! = 3 × 2 × 1 = 3 × 2 = 6
By convention, 0! is 1.