Domanda di colloquio di Amazon

Write a function to calculate exponents with recursion.