Capgemini Interview Question

Asked me to write a program without using for loop