•
Contents
•
Up
•
Test
•
Function power(x,n) has the following heading.
public static int power(int x, int n)
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]