Factorial

Factorial. In mathematics, the factorial of an integer n, denoted by n!, is the product of all positive integers from 1 to n:

n! = 1 × 2 × … × n

For a given integer n, calculate the value of n! without using the math module.

Test Case Input (n) Expected Output
1 3 6
2 5 120
3 7 5040