Pergunta de entrevista da empresa Honeywell

Basic function definition problems in language of choice