subject
Computers and Technology, 16.12.2019 19:31 bbyarxi

You will be given a file that will contain averages for classes which are divided into sections in the following format. the name of this file will be "grades. txt".

a 93
b 82
a 86
c 75
f 83
you are to write a program that computes the averages for the sections of classes, they are divided into groups that are denoted by a capital letter. you are to use arrays to calculate the average. i recommend using two arrays one to keep a sum of the averages and the other a counter for how many classes have been added to the sum.

the equation for calculating the average is:

(sum of numbers in list) / (number of numbers in list)
given this you can have one array to keep a sum of the numbers that you are given and the other to keep a count of the number of classes in that section. the section names will be from a - z and will always be capital letters. the averages will be from 0 - 100 inclusively.

your program should output to the console the highest average section, lowest average section, and the average score across all of the sections. output both the section name and the score for that section. to a file you will print the average for each section in alphabetical order. always output the scores with two decimal places.

to the console:

highest average: : 98.00
lowest average: : 73.00
average score: .00
to a file named "results. txt":

a: 98.00
b: 93.00
c: 85.21
d: 95.12
.
.
.
z: 78.25
in c++

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:00
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
You know the right answer?
You will be given a file that will contain averages for classes which are divided into sections in t...
Questions
question
Health, 05.12.2020 03:00
question
Mathematics, 05.12.2020 03:00
question
Spanish, 05.12.2020 03:00
question
Mathematics, 05.12.2020 03:00
question
Mathematics, 05.12.2020 03:00
question
Medicine, 05.12.2020 03:00
question
Mathematics, 05.12.2020 03:00
question
Mathematics, 05.12.2020 03:00
Questions on the website: 13722361