Hexaware Technologies interview question

Asked me to write basic codes