CitiusTech interview question

Two programs One puzzle