whats the format for asking the user to select a range of numbers from zero to a positive number? and that the number they put in is the top of the range ?
You can create an array with a bunch of numbers. Display all the numbers in the array, make them choose a number. If you want to make sure they chose the biggest number(thats what I assume you mean from the top of the range) you can use a function to get the highest number in the array and see if they match.
Ive probably misunderstood, your question was very vague and not very clear. An example would help.
example would be, like a guessing game where you ask the user for a number input, so the range that the generator could select would be between zero and the number they selected.
Are you asking for a user to input a range, inclusive?
Could always ask then to input the bottom of the range, set that to x, then have them input the top, y, and use those values to define the range, inclusive.