Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5 Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. For

Question 5
Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. For example: If the user enters the values 65,43,78,67 and 64, the output will be:
INP1501/102/0/2024
After dropping the lowest test score, the test average
is68.50
This average is calculated by dropping the lowest score which is 43 and dividing the sum of the remaining four values 65,78,67 and 64, which is 274, by 4.
It should use the following functions:
An int function get5core with no parameters, to ask the user for a single test score, validate it and retum the score. The function should be called by the main function once for each of the five scores to be entered. Do not accept test scores lower than 0 or higher than 100.
An int function findLoweat that is passed the five fest scores and then finds and returns the lowest of the five scores passed to it. It is called by function calckverage, to determine which of the five scores to drop.
A float function caleiverage that is passed the five test scores and then calculates and returns the average of the four highest scores.
A void function displayoutput that is passed the average score; it then displays the average of the test scores. Display two digits after the decimal point.
You must submit the four functions you have developed as well as output using the following 5 sets of input data:
6524807351
6638846959
7252812353
6528726365
6555756862
Submit the program and the output.
image text in transcribed

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

Does it have correct contact information?

Answered: 1 week ago