Consider the following function:int f(int n){ if (n <= 1) { return 1; } if (n % 2 == 0)
Chapter 5, Problem R5.13(choose chapter or problem)
Consider the following function:int f(int n){ if (n <= 1) { return 1; } if (n % 2 == 0) // n is even { return f(n / 2); } else { return f(3 * n + 1); }}Perform traces of the computations f(1), f(2), f(3), f(4), f(5), f(6), f(7), f(8), f(9),and f(10).
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer