about | help | code help+videos | done | prefs |
Write a RECURSIVE method that returns the value of 'base' to the given power 'pow'. You may NOT use any Math methods and you MUST use recursion. For example, if 'base' is 3 and 'pow' is 4, the result is 81 because 3 to the 4th power is 81. If 'base' is 10 and 'pow' is 2, the result is 100 since 10 to the 2nd power is 100. recursiveExponent(11, 5) → 161051 recursiveExponent(11, 7) → 19487171 recursiveExponent(10, 2) → 100 ...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: 390
Copyright Nick Parlante 2017 - privacy