Write a program that reads the integers between 1 and 100 and counts the occurrences of each. Assume the input ends 0. Here is a sample run of the program:
_______________________________________________________________________________
Enter the intergers between 1 and 100: 2 5 6 5 4 3 23
2 occurs 2 times
3 occurs 1 times
4 occurs 1 times
5 occurs 2 times
6 occurs 1 times
23 occurs 1 times
43 occurs 1times
_______________________________________________________________________________
Note: that if a number occurs more than one time , the plural word "times" is used in the output.
The answer to the question is available in the PDF file https://assignmentexpert.com/https://assignmentexpert.com/homework-answers/programming-answer-36735.pdf
Comments
Leave a comment