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 09:50
What is a rush associated with alcohol?
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
question
Computers and Technology, 24.06.2019 08:30
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
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, 10.10.2021 07:30
question
Mathematics, 10.10.2021 07:30
question
Mathematics, 10.10.2021 07:30
question
Mathematics, 10.10.2021 07:30
Questions on the website: 13722360