Cognizant Interview Question

Write a code on recurrsion