Pergunta de entrevista da empresa IBM

Solve a programming question/Write a program