Write a recursive method called power that takes a double x and an integer n and that returns xn.
Hint: a recursive definition of this operation is x n = x·xn−1. Also, remember that anything raised to the zeroed power is 1.
Optional challenge: you can make this method more efficient, when n is even, using xn = (xn/2)2.