Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use c++ to write out the code using comments and please do not hand write the code. Thanks in advance Program 2 Lowest Score

image text in transcribed Please use c++ to write out the code using comments and please do not hand write the code. Thanks in advance
image text in transcribed
Program 2 Lowest Score Drop For this problem, please implement Problem #11 on page 375 of Gaddis, 9 Edition. A scan of the problem is included below for those who don't have a copy of the book 11. Lowest Score Drop that calculates the average of a group of test scores, where the lowest Write a program score in the group is dropped. It should use the following functions void getscore) should ask the user for a test score, store it in a reference param- eter variable, and validate it. This function should be called by main once for each of the five scores to be entered. . void 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 int 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 O or bigber than 100. In general, your program should ask the user for five different test scores, determine which one is the lowest, and calculate and display the average of the remaining four highest scores. The test scores are assumed to be ints. Note that although the test scores in this problem are ints, the average should be calculated as a double. Have it printed out to two decimal places. Notice that this problem includes a requirement to create three different functions besides the main function. Here are some programming notes for those functions: 1) void getScore (int &) The getScore) function should include a prompt to enter another test score, an input statement, and an input validation loop that makes sure the number entered is between 0 and 100 (incluve. Once the number passes the input validation loop, the function will return the value back through a reference parameter (not the return mechanism of the function). The return data type on the function is therefore void. 2) void calcAverage (int, int, int, int, int) This function will have five input parameters that represent the five test scores for which we are calculating the average. The function will determine the lowest of the five scores by calling the function findLowestO. Once that is determined, it will calculate the average of the remaining four scores and display that information to the screen in a nicely formatted report. (Print out an explanatory statement followed by the average value to

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

7 Explain how to choose which points in your message to illustrate

Answered: 1 week ago