#C11342. Factorial Function
Factorial Function
Factorial Function
Given a non-negative integer n, compute its factorial, denoted as n!. The factorial is defined as:
$$ n! = \prod_{i=1}^{n} i \quad \text{with} \quad 0! = 1 $$
Your task is to read an integer from standard input, calculate its factorial, and output the result to standard output.
inputFormat
The input consists of a single non-negative integer n (0 ≤ n ≤ 20) provided via standard input.
outputFormat
Output a single integer representing n! (the factorial of n) to standard output.## sample
0
1
</p>