FarEye Interview Question

Question 1 ) write the program for