Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 21.6 -- (Count the occurrences of numbers entered) Write a program that reads an
- unspecified number of integers and finds the one that has the most occurrences. The
- input ends when the input is 0. For example, if you entered 2 3 40 2 5 4 -3 3 3 2 0,
- the number 3 occurred most often. If not one but several numbers have the most
- occurrences, all of them should be reported. For example, since 9 and 3 appear
- twice in the list 9 30 3 9 3 2 4, both occurrences should be reported.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement