#C12077. Iterative Factorial Calculation
Iterative Factorial Calculation
Iterative Factorial Calculation
Given a non-negative integer \(n\), compute its factorial using an iterative approach. The factorial of \(n\) is defined as:
\[ n! = \begin{cases} 1, & \text{if } n = 0 \\ 1 \times 2 \times \cdots \times n, & \text{if } n \geq 1 \end{cases} \]
Your task is to read an integer from standard input, compute its factorial, and output the result to standard output.
inputFormat
The input consists of a single line containing one non-negative integer \(n\) such that \(0 \le n \leq 20\) (or a similar constraint ensuring no integer overflow in typical languages).
outputFormat
Output the factorial of the given number \(n\) to standard output.
## sample0
1