about | help | code help+videos | done | prefs |
Give a recursive algorithm whose input is a real number r and a non-negative integer n, and whose output is r^(2 ^ n) . Note that the exponent of r is 2 ^ n. Your algorithm should only use addition and multiplication operations and should not contain any iterative loops. superPowerRecursive(3, 0) → 3 superPowerRecursive(3, 1) → 9 superPowerRecursive(3, 2) → 81 ...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: 300 Post-solution available
Copyright Nick Parlante 2017 - privacy