Infosys interview question

Basic programming and analytical