Pergunta de entrevista da empresa Epic

Some basic programming question, not too hard