
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
C++ you have to you use #include <random>
also included a sample output has too match the layout
Thank you

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.](https://content.bartleby.com/qna-images/question/9f85ebe0-91a5-4e3a-8fb8-74b30a8894ed/c3797c7e-67a1-4673-aec0-2158802cfd38/u71r2kq_thumbnail.png)
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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images

Knowledge Booster
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
- In PYTHON Using one of the loop construct draw:- A square- Side length: 10 units (or pixels) Assumption- Use of Turtle libraryarrow_forwardStrict Warning ⚠️ Don't you dare give me AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.arrow_forwardTo make the code easier to understand, many design techniques are applied.arrow_forward
- Python!! Learning Objectives Use the while loop to repeat action an unknown number of times Practice input() statement inside the loop Learn complex string comparison condition inside the the while loop Create a function with a given name and parameter and given return values Use if/else statements inside the function to achieve different return statements by condition Use int() integer conversion function to have the number from string Instructions A keyboard can be really tricky! You try to enter a number but it prints a letter again and again! Let's try to fix that. Create a function is_this_digit(input_line) that checks if the string parameter is a digit. The function should return True or False 1.1. String contains only one digit if the string length is 1 and the character inside is digit character. To check last condition use <target_var>.isdigit() function (e.g., "2".isdigit() will return True) or string comparison such as "0" <= target <= "9" Read the input…arrow_forwardimport math # Lab 3 - Road Trip # Program determines the time it takes to complete a road trip from Chicago to other cities in the US # and how many podcasts you can listen to on the road trip # TODO: Add your name and the names of your team members # Get input from user of what city they would like to visit city = input("What city would you like to visit? ") distance_to_city = { 'Chicago': 0, 'Minneapolis': 410, 'Columbus': 350, 'Nashville': 475, 'Denver': 1005 } speed = 70 # miles per hour hours_per_day = 8 # hours you can travel per day podcast_length = 25 # minutes # TODO: finish the code herearrow_forward4arrow_forward
- c++ Language I need help with question #6 part c please. **WITHOUT "DP" please. I keep getting dp in the answers from you guys and it's very confusing and i can't use that please. Don't use "DP" please and thank you so much. I asked this question 3 times but i keep getting programs im not able to run. Please make it as simple as possible for me thank you so so much. I did a and b already, i just need with c using dynamic programming. Please and thanks!arrow_forwardConcentric circle(15) NUM_CIRCLE=15 OFFSET=15 pensize(innercircle)=5 pensize (outercircle)=2 Circle color='blue' Fill color(inner circle)='yellow'/'red' Use if statement Use for loop statement Use python turtle importarrow_forwardVarious design methods are used to increase readability of the code.arrow_forward
- Variable values are kept in their designated memory.arrow_forwardPYTHON PROGRAMMING ONLY PLZZ Ask the user to enter numbers: You must have a way for the user to stop entering numbers. An example would be to have the user type q. Store the numbers the user entered into a list Calculate the total Calculate the average Calculate the largest number Display the following information to the user: How many numbers the user entered The total The average The largest number Print each value with a description do not just print numbers to the console. Describe each number as they print.arrow_forwardTo facilitate comprehension of the code, we use a variety of design techniques.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education