about | help | code help+videos | done | prefs |
Write a recursive function recPower(a, n) that returns the value of a raised to the nth power (i.e. a = a*a*...*a) without using the ** operator. You may assume n is non-negative. recPower(2, 3) → 8 recPower(3, 2) → 9 recPower(8, 0) → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy