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, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most? a)give the file a unique name b)name the file in yymmdd format c)use descriptive name while naming the files d)use capital letters while naming the file
Answers: 3
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
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
Mathematics, 03.03.2021 19:30
question
Mathematics, 03.03.2021 19:30
Questions on the website: 13722367