Pergunta de entrevista da empresa Honeywell

Solve an algorithm using whichever programming language ( C or C++ in this case)