Capgemini Interview Question

code for finding nth root