Question d’entretien chez Amazon

Write a function to calculate exponents with recursion.