Chapter 8: Recursion – x^y & i*j


Today

Recursion

Classwork: Paper and pencil
1. Write a recursive definition of xy (x raised to the power y), where x and y are integers and y > 0. Trace your recursive definition for x = 2 and y = 3.

2. Write a recursive definition of i * j (integer multiplication), where i > 0. Define the multiplication process in terms of integer addition. For example, 4 * 7 is equal to 7 added to itself 4 times.