function y = Power(x, n)
% y = x^n where n is an integer >=0

if n == 0
    y = 1;
elseif rem(n, 2) == 0
    y = Power(x, n/2)^2;
else
    y = Power(x, (n-1)/2)^2 * x;
end

