Factorial
Calculates the factorial of a number.
- Use recursion.
- If
num
is less than or equal to1
, return1
. - Otherwise, return the product of
num
and the factorial ofnum - 1
. - Throws an exception if
num
is a negative or a floating point number.