Infosys Interview Question

Hard coding question and printf won’t work