Question: Write a program that takes user input from the terminal as a string and outputs the sorted frequency count of the numeric digits in the

Write a program that takes user input from the terminal as a string and outputs the sorted frequency count of the numeric digits in the string. The output should be sorted such that the frequency count follows the digit and those digits with higher counts are at the top. If two digits have the same count, sort them numerically with the largest digit first. The text line may contain any English letter or number and zero or more whitespace characters (spaces and tabs only).

Your program should include at least one function that takes in an array. Hint: You may want to use this function to print the frequencies in the correct sorted order. Also, your program should include a constant storing the max length of the input string. The max length is 200 characters. If the string is longer than that, then output should be 'Invalid Input'

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!