Try a for loop, start would be one of the numbers and the end the other. Check to see which one is greater in case you need to display them in descending order, by reducing the index instead of increasing.