Pregunta de entrevista de Bloomberg

Write a program to validate the numbers in range