Question Details: Please help!Assignment due soon! Problem: Lowest Score Drop Wr
ID: 3610563 • Letter: Q
Question
Question Details:
Please help!Assignment due soon!
Problem:
Lowest Score Drop
Write a program that calculates the average of a group of testscores, where the lowest score in the group is dropped. Itshould use the following functions:
-void 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 fivescores to be entered.
- void calcAverage () should calculate and display theaverage of the four highest scores. This function should becalled just once by main, and should be passed the five scores.
- int findLowest() should find and return the lowest ofthe five scores passed to it. It should be called bycalcAverage, which uses the function to determine which ofthe five scores to drop.
Input Validation: Do not accept test scores lower than 0 orhigher than 100.
Explanation / Answer
please rate - thanks #include using namespace std; void getScore(int&); void calcAverage(int,int,int,int,int); int findLowest(int,int,int,int,int); int main() {int n1,n2,n3,n4,n5; getScore(n1); getScore(n2); getScore(n3); getScore(n4); getScore(n5); calcAverage(n1,n2,n3,n4,n5); system("pause"); return 0; } void getScore(int& num) {do {coutnum; if(num100) coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.