Practice
Senior Example Problem 4: Well Ordered Numbers
What are Well Ordered Numbers?
- An integer is considered well ordered if each digit value increases from left to right.
- For example, 123 is well-ordered because 1 < 2 < 3, but 285 is not well-ordered because 8 > 5.
Instructions
- Write a program that will find and display all possible three digit well-ordered numbers.
- Your output should contain eight numbers per line, with a tab character between each number.
- Output sould be in ascending order.
- No other output should be produced by your program other than the numbers.
Example Output
123 124 125 126 127 128 129 134
135 136 137 ??? ??? ??? ??? ???
...
Check Your Solution
Example Solution