Skip to the content of the web site.

Project K.3: Factorial function

Implement the factorial function iteratively; that is, using a loop.

Implement the factorial function recursively; that is, by using the formula that $n! = n \cdot (n - 1)!$ where $0! = 1! = 1$.

Implement the Gamma function and then implement the factorial function as calculating $n! = \Gamma(n + 1)$.