Pergunta de entrevista da empresa Amazon

Write a function to calculate exponents with recursion.