Divisible
source: Tino Duong, 2003
Description:
Write a program that searches through a list for numbers that are evenly divisible by a particular value.
Requirements:
- Generate an array of 50,000 random integers
- Prompt user to enter another integer: "userVal"
- Print to the screen, in numeric order from smallest to largest, the numbers in the array that are evenly divisible by "userVal"
- If an evenly divisible number occurs more than once in the array, print the
number and the number of occurrences beside it, rather than printing the
number multiple times.
(NOTE: The lower limit of the range is 1, and the upper limit is 50 000)
Concepts:
- Arrays
- Standard I/O
- Functions