Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Important - Make sure to comment your code! Write a program that calculates the average of a group of test scores, where the lowest score

Important - Make sure to comment your code!
Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. Use and array or vector to store the numbers. It should use the following functions:
getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of the five scores to be entered.
calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main and should be passed the five scores.
findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop.
Input Validation: Do not accept test scores lower than 0 or higher than 100.
Output: Display to the user the 5 scores entered, lowest score, 4 scores counted, and average of the scores.
Example:
5 scores -100,98,34,89,70
Lowest score -34
Scores counted -100,98,89,70
Average is 89.25

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago