Write a program to compute the factorial of a given number. The factorial of a number (n) is 1 x 2 x 3 x 4 x ....x n.
Test Data
Input | Output |
---|---|
0 | 1 |
5 | 120 |
10 | 3628800 |
Input
num >= 0 (integer)
Write a program to compute the factorial of a given number. The factorial of a number (n) is 1 x 2 x 3 x 4 x ....x n.
Input | Output |
---|---|
0 | 1 |
5 | 120 |
10 | 3628800 |
num >= 0 (integer)