Advertisement
Guest User

Untitled

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