
Lesson 13A-1: Check Prelab Exercises
Recursion | 315
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1
Call n Function Value Returned
Nonrecursive Call 5 120
1st Recursive Call 4 24
2nd Recursive Call 3 6
3rd Recursive Call 2 2
4th Recursive Call 1 1
5th Recursive Call 0 1
Exercise 2
Call first Function Value Returned
Nonrecursive Call 0 45
1st Recursive Call 1 45
2nd Recursive Call 2 42
3rd Recursive Call 3 36
4th Recursive Call 4 27
5th Recursive Call 5 15
6th Recursive Call 6 0
7th Recursive Call
Note that the function return value is assigned at the end of the execution of ...