Question: Write a program to take input numbers from user until user enters -1. Print the frequency of numbers from 0 to 9 that occurred in

Write a program to take input numbers from user until user enters -1. Print the frequency of numbers from 0 to 9 that occurred in all previous inputs altogether. Do not consider -1 and storing the user input in storages like arrays are not allowed. For example, if user entered 43534, 23354, 986, 587, 6, -1 then frequencies are: 0: 0, 1: 0, 2: 1, 3: 4, 4: 3, 5: 3, 6: 2, 7: 1, 8: 2, 9: 1. This means 0 occurred 0 times, 1 occurred 0 times, 2 occurred 1 times and so on. Assume user will enter valid i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!