01) Write a program that reads the integers between 1 and 100 and counts the occurrencesof each. Assume the input ends with 0. Here is a sample run of the program: Enter the integers between 1 and 100: 2 5 6 5 4 3 23 43 2 0 -Eemer 2 occurs 2 times 3 occurs 1 time 4 occurs 1 time 5 occurs 2 times 6 occurs 1 time 23 occurs 1 time 43 occurs 1 time Note that if a number occurs more than one time, the plural word "times" is used in the output.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter2: Basic Elements Of C++
Section: Chapter Questions
Problem 15PE: 15. Write a program to implement and test the algorithm that you designed for Exercise 15 of Chapter...
icon
Related questions
Question

please use java to answer the following question

01) Write a program that reads the integers between 1 and 100 and counts the occurrencesof
each. Assume the input ends with 0. Here is a sample run of the program:
Enter the integers between 1 and 100: 2 5 6 5 4 3 23 43 2 0 Enter
2 occurs 2 times
3 occurs 1 time
4 occurs 1 time
5 occurs 2 times
6 occurs 1 time
23 occurs 1 time
43 occurs 1 time
Note that if a number occurs more than one time, the plural word “times" is used in the output.
Transcribed Image Text:01) Write a program that reads the integers between 1 and 100 and counts the occurrencesof each. Assume the input ends with 0. Here is a sample run of the program: Enter the integers between 1 and 100: 2 5 6 5 4 3 23 43 2 0 Enter 2 occurs 2 times 3 occurs 1 time 4 occurs 1 time 5 occurs 2 times 6 occurs 1 time 23 occurs 1 time 43 occurs 1 time Note that if a number occurs more than one time, the plural word “times" is used in the output.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning