Methods 4 - recursion


examples


Classwork

1. The factorial of a number is the product of all numbers from 1 up to that number, for instance 3! = 3 * 2 * 1. Write a module factorial that takes an int and returns the factorial using recursion. Also write a similar method factorloop that finds the factorial using a loop