Create an integer array of size 50, name this array as "examArr". This array stores the grades of an exam. Initialize all elements in "examArr" with the value 0. Fill "examArr" with random integers in the range [0, 100]. Display the contents of "examArr", 5 elements per line. Display a summary report for "examArr" showing the following information: a. The maximum value in "examArr", and the location of the maximum number (the index/subscript of the maximum). If the maximum value is repeated, report the first location of the maximum value. b. The minimum value in “examArr", and the location of the minimum number. If the minimum value is repeated, report the first location of the minimum value. c. The average value of all numbers in "examArr". d. The average value of non-zero numbers in "examArr" (i.e. exclude all zeros in the array, if any). The frequency of each possible grade (i.e. how many students got the same grade). f. The mode of grades (i.e. the highest occurring grade (most frequent)). If there are more one grade, display all of them. e.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question
100%

C++ you have to you use #include <random> 

also included a sample output has too match the layout

Thank you

The array is being filled with random numbers ...
The randomization process is done,
here are the current values in the array
46
49
45
79
53
43
13
86
47
21
1
4
71
90
53
24
86
80
18
55
1
28
35
3
12
62
95
95
70
99
24
12
62
40
0
52
81
13
The maximum grade is: 99
The maximum grade is located at the index 6
0 (1) 1 (2)
5 (0)
6 (0)
10 (0)
11 (0)
15 (0)
16 (0)
20 (0)
21 (1)
25 (0)
26 (0)
30 (1)
31 (0)
35 (1)
40 (1)
45 (1)
50 (0)
14
17
30
48
27
The minimum grade is: 0
The minimum grade is located at the index 31
The average of all grades in this class is: 43.5
The average of non-zero grades in this class is: 44.3878
Grades are being counted ...
Here are the frequencies of all grades:
4 (1)
9 (0)
14 (1)
19 (0)
24 (2)
(0)
36 (0)
41 (0)
46 (1)
51 (0)
55 (1) 56 (0)
60 (0)
61 (0)
65 (0)
66 (0)
70 (1)
71 (1)
2 (0) 3 (1)
7 (0)
8 (1)
12 (4)
13 (2)
17 (1)
18 (2)
22 (0)
27 (1)
32 (0)
37 (0)
42 (0)
47 (1)
52 (1)
57 (0)
62 (2)
67 (1)
97
12
72 (0)
75 (0)
76 (0)
77 (1)
80 (1)
81 (1)
82 (0)
85 (0)
86 (2)
87 (0)
90 (1) 91 (0)
92 (0)
95 (2) 96 (0) 97 (1)
100 (0)
67
18
12
77
8
23 (0)
28 (1)
33 (0)
38 (0)
43 (1)
48 (1)
(0)
39 (0)
44 (0)
49 (1)
54 (0)
59 (0)
53 (2)
58 (0)
63 (0)
64 (0)
68 (0)
69 (0)
73 (0)
74 (0)
78 (0)
79 (1)
83 (0)
84 (0)
88 (0) 89 (0)
93 (0)
(0)
98 (0) 99 (1)
Finding the the mode of grades (the most frequent)
The highest frequency is: 4
The mode of grades:
The grade (12) is the most frequent grade.
Transcribed Image Text:The array is being filled with random numbers ... The randomization process is done, here are the current values in the array 46 49 45 79 53 43 13 86 47 21 1 4 71 90 53 24 86 80 18 55 1 28 35 3 12 62 95 95 70 99 24 12 62 40 0 52 81 13 The maximum grade is: 99 The maximum grade is located at the index 6 0 (1) 1 (2) 5 (0) 6 (0) 10 (0) 11 (0) 15 (0) 16 (0) 20 (0) 21 (1) 25 (0) 26 (0) 30 (1) 31 (0) 35 (1) 40 (1) 45 (1) 50 (0) 14 17 30 48 27 The minimum grade is: 0 The minimum grade is located at the index 31 The average of all grades in this class is: 43.5 The average of non-zero grades in this class is: 44.3878 Grades are being counted ... Here are the frequencies of all grades: 4 (1) 9 (0) 14 (1) 19 (0) 24 (2) (0) 36 (0) 41 (0) 46 (1) 51 (0) 55 (1) 56 (0) 60 (0) 61 (0) 65 (0) 66 (0) 70 (1) 71 (1) 2 (0) 3 (1) 7 (0) 8 (1) 12 (4) 13 (2) 17 (1) 18 (2) 22 (0) 27 (1) 32 (0) 37 (0) 42 (0) 47 (1) 52 (1) 57 (0) 62 (2) 67 (1) 97 12 72 (0) 75 (0) 76 (0) 77 (1) 80 (1) 81 (1) 82 (0) 85 (0) 86 (2) 87 (0) 90 (1) 91 (0) 92 (0) 95 (2) 96 (0) 97 (1) 100 (0) 67 18 12 77 8 23 (0) 28 (1) 33 (0) 38 (0) 43 (1) 48 (1) (0) 39 (0) 44 (0) 49 (1) 54 (0) 59 (0) 53 (2) 58 (0) 63 (0) 64 (0) 68 (0) 69 (0) 73 (0) 74 (0) 78 (0) 79 (1) 83 (0) 84 (0) 88 (0) 89 (0) 93 (0) (0) 98 (0) 99 (1) Finding the the mode of grades (the most frequent) The highest frequency is: 4 The mode of grades: The grade (12) is the most frequent grade.
Create an integer array of size 50, name this array as “examArr". This array stores the
grades of an exam.
Initialize all elements in “examArr” with the value 0.
Fill "examArr" with random integers in the range [0, 100].
Display the contents of "examArr", 5 elements per line.
Display a summary report for "examArr" showing the following information:
a. The maximum value in “examArr", and the location of the maximum number (the
index/subscript of the maximum). If the maximum value is repeated, report the
first location of the maximum value.
b. The minimum value in "examArr", and the location of the minimum number. If
the minimum value is repeated, report the first location of the minimum value.
c. The average value of all numbers in "examArr".
d. The average value of non-zero numbers in “examArr" (i.e. exclude all zeros in the
array, if any).
e. The frequency of each possible grade (i.e. how many students got the same
grade).
f. The mode of grades (i.e. the highest occurring grade (most frequent)). If there are
more one grade, display all of them.
Transcribed Image Text:Create an integer array of size 50, name this array as “examArr". This array stores the grades of an exam. Initialize all elements in “examArr” with the value 0. Fill "examArr" with random integers in the range [0, 100]. Display the contents of "examArr", 5 elements per line. Display a summary report for "examArr" showing the following information: a. The maximum value in “examArr", and the location of the maximum number (the index/subscript of the maximum). If the maximum value is repeated, report the first location of the maximum value. b. The minimum value in "examArr", and the location of the minimum number. If the minimum value is repeated, report the first location of the minimum value. c. The average value of all numbers in "examArr". d. The average value of non-zero numbers in “examArr" (i.e. exclude all zeros in the array, if any). e. The frequency of each possible grade (i.e. how many students got the same grade). f. The mode of grades (i.e. the highest occurring grade (most frequent)). If there are more one grade, display all of them.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
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