Skip to main content

Checkpoint: integer power

Challenge on lesson: Checkpoint: methods

CHALLENGE
Difficulty: beginner+25 XP

Implement int pow(int base, int exp): base raised to exp using a loop (no Math.pow). exp >= 0. Note the special case: anything to the 0 is 1.

Back to lesson: Checkpoint: methods