Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed (UPI) Chapter 14: Exploring Recursion!

Instruction

Simple math recursion

Calculating a Factorial

The factorial of a positive integer is defined as the product of the integer and the positive integers less than the integer.

Example: 5! = 5 * 4 * 3 * 2 * 1

Written as a general equation for a positive integer n:

n!=n∗(n−1)∗(n−2)∗…∗1n! = n * (n - 1) * (n - 2) * ldots * 1n!=n∗(n−1)∗(n−2)∗…∗1

The above formula for the factorial of n results in a ...