def factorial(n) if n == 0 1 else n * factorial(n - 1) end end factorial(5) //=> 120
def factorial(n) if n == 0 1 else n * factorial(n - 1) end end