Pregunta de entrevista de FIS

Had to code for a scenario.