Check if ReadIntegerRange includes the upper limit. You can also use a fmt.Println(userInput ) to check which number is being processing inside the for and before enter to the nest of ifs… Also (maybe you will check later in your course) using an switch gives your additional readability and simplicity in your code.