Pregunta de entrevista de Amazon

Write a function to calculate exponents with recursion.