about | help | code help+videos | done | prefs |
This method MUST use recursion in a meaningful way to solve the problem! Write a method called "recursiveCats" that returns the total number of "lives" that howManyCats have, based on the idea that each cat has 9-lives. For example, recursiveCats(4) returns 36 because each of the 4 cats has 9-lives making a total of 36 lives. Remember, your solution MUST be recursive. You may assume that howManyCats will be non-negative and will not be so large that it causes a stack-overflow due to the recursion. recursiveCats(9) → 81 recursiveCats(1) → 9 recursiveCats(0) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 330
Copyright Nick Parlante 2017 - privacy