Amazon Interview Question

Write a function to calculate exponents with recursion.