Add a function to get an input int inside a range.