Chapter 4 Exercise Set 1ΒΆ

  1. What happens if you call the countdown function introduced in the Recursion section with an argument that is a negative number?

  2. Draw a stack diagram for n_lines, invoked with the parameter n equal to 4.

  3. Write a function named compare that takes two int arguments, a and b, and prints out whether a is greater than b, a is less than b, or a is equal to b.