Practice
Junior Example Problem 3: Choice Numbers
What are Choice Numbers?
- A number is considered choice if one of its factors is also the number of factors of the number.
- For instance, the number 24 has 8 factors: 1, 2, 3, 4, 6, 8, 12, 24. Eight is itself one of those factors, so 24 is considered choice. Eleven is not choice, as it has only 2 factors and 2 is not a factor of 11.
Instructions
- Write a program that will print all the choice numbers less than 1000.
- Your output should contain each choice number on a sinle line.
- Output sould be in ascending order.
- No other output should be produced by your program other than the numbers.