The website is currently being updated for 2022-2023 and some features may become unavailable. Sorry for the inconvenience!

Unit 10

powerN

Given base and n that are both 0 or more, compute recursively (no loops) the value of base to the n power, so powerN(3, 2) is 9 (3 squared).


powerN(3, 1) → 3
powerN(3, 2) → 9
powerN(3, 3) → 27

Type your solution        
Copyright © Dom David 2022 All rights reserved. Twitter