The factorial function is a mathematical formula represented by an exclamation mark "!". The factorial of a non-negative integer n is the p roduct of all positive integers less than or equal to n.
Here’s an example:
7! = 1 * 2 * 3 * 4 * 5 * 6 * 7 = 5.040
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5 040 |
| 8 | 40 320 |
| 9 | 362 880 |
| 10 | 3 628 800 |