Pregunta de entrevista de Honeywell

Basic function definition problems in language of choice