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:

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 8RQ
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,