Write a program that uses the map template class to compute a histogram of positive numbers entered by the user. The map’s key should be the number that is entered, and the value should be a counter of the number of times the key has been entered so far. Use −1 as a sentinel value to signal the end of user input. For example, if the user inputs:
5
12
3
5
5
3
21
–1
then the program should output die following (not necessarily in this order):
The number 3 occurs 2 times
The number 5 occurs 3 times
The number 12 occurs 1 times
The number 21 occurs 1 times
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.