Implement a function that raises x to the integer power n.
Handle zero and negative exponents without using the language's built-in exponentiation operation.
Inputx = 2, n = 10
Output1024
Multiplying ten factors of 2 gives 1024.
Inputx = 2, n = -2
Output0.25
A negative exponent takes the reciprocal. Here 1 ÷ (2 × 2) = 0.25.
-2³¹ ≤ n ≤ 2³¹ - 1