•
Contents
•
Up
•
Test
•
Function power(x,n) has the following heading.
public static int power(int x, int n)
Using recursion (and not a loop), write a definition of power so that it returns
x
n
. Assume that
n
is positive. Use a loop to accumulate the power.
Answer
Store
Compute
[
Language:
Java
Kind:
function definition]