Kotlinlearncs.online LogoJava
Return to List

Homework: Int Power

Created By: Chris Taylor
/ Version: 2023.6.0

Complete the following method that returns x raised to the n power. The method must throw an IllegalArgumentException if n is negative. Your implementation must use recursion and may not use the Math class or any loops.

Related Lessons

Stuck? You may find these lessons helpful: