Assignment 3-B: Values frequency in an array Collapse context You are required to write a code that takes an array of 10 integer values, finds and prints the following: • Each value that appear in the array and its frequency (how many times the value appears in the array). • The value with the maximum frequency. If two or more values have frequencies equal to the maximum frequency, the program prints the minimum value among these values. The output should be formated as given by the following example. If the entered array values are: {19, 5, 6, 6, 7, 5, 0, 4, 6, 0} such that array[0] = 19 and so on, then the program should output each value and its frequency separated by ":" starting from the value of array [0]. The last line in the output displays the value with the highest frequency. So, the output in this example would be like this: 19:1 5:2 6:3 7:1 0:2 4:1 6. 1/0 Program Input:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Assignment 3-B: Values frequency in an array
Collapse context
->
You are required to write a code that takes an array of 10 integer values, finds and prints the following:
• Each value that appear in the array and its frequency (how many times the value appears in the array).
• The value with the maximum frequency. If two or more values have frequencies equal to the maximum frequency, the program prints the minimum
value
among
these values.
The output should be formated as given by the following example. If the entered array values are: {19, 5, 6, 6, 7, 5, 0, 4, 6, 0} such that array[0] = 19 and so on,
then the program should output each value and its frequency separated by ":" starting from the value of array [0]. The last line in the output displays the value
with the highest frequency. So, the output in this example would be like this:
19:1
5:2
6:3
7:1
0:2
Fo
4:1
1/O
Program Input:
Su
An array of 10 integer elements.
6
Transcribed Image Text:Assignment 3-B: Values frequency in an array Collapse context -> You are required to write a code that takes an array of 10 integer values, finds and prints the following: • Each value that appear in the array and its frequency (how many times the value appears in the array). • The value with the maximum frequency. If two or more values have frequencies equal to the maximum frequency, the program prints the minimum value among these values. The output should be formated as given by the following example. If the entered array values are: {19, 5, 6, 6, 7, 5, 0, 4, 6, 0} such that array[0] = 19 and so on, then the program should output each value and its frequency separated by ":" starting from the value of array [0]. The last line in the output displays the value with the highest frequency. So, the output in this example would be like this: 19:1 5:2 6:3 7:1 0:2 Fo 4:1 1/O Program Input: Su An array of 10 integer elements. 6
)72( عباس الامير وسراج الامہر
f(1) Facebook
Assignr
A Not secure cpe-pc.ju.edu.jo/course/Computer_Skills_For_Engineers
Sample Test Case 0
Input:
2 30 0 208080 30
Output:
2:2
30:2
0:4
8:2
Sample Test Case 1
Input:
1751117577
Output:
1:4
7:4
5:2
9 Type here to search
63
Transcribed Image Text:)72( عباس الامير وسراج الامہر f(1) Facebook Assignr A Not secure cpe-pc.ju.edu.jo/course/Computer_Skills_For_Engineers Sample Test Case 0 Input: 2 30 0 208080 30 Output: 2:2 30:2 0:4 8:2 Sample Test Case 1 Input: 1751117577 Output: 1:4 7:4 5:2 9 Type here to search 63
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Passing Array as Argument
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education