Infosys interview question

Leap year program