Question 4
20 pts
1.
The factorial of a positive integer n, fact(n), is defined recursively as follows:
fact (n) = 1, when n = 1
fact (n) = n * fact (n-1), otherwise
What are the values of the above function when n = 1, 2, 3, and 4
Define a recursive function fact that returns the factorial of a given positive number.
2. Describe the cost and benefits of defining and using a recursive function.