I need to create a program that calculates the average of a seriesof test scores
ID: 3613433 • Letter: I
Question
I need to create a program that calculates the average of a seriesof test scores, where the lowest grade in the series is dropped.The input scores will be: 70, 80, 60, 80, 70. I also need to usethe functions whose prototypes are:void getValues( ); // no parameters
void calcAvg (int, int, int, int,int); //5 formal parameters
int findLow(int, int, int, int, int); //5 formal parameters
i created the shell below and indicate where i need my help:
#include <iostream>
#include <iomanip>
using namespace std;
void getValues ( );
void calcAvg (int, int, int, int, int);
int findLow (int, int, int, int, int);
int main()
{
cout << " Enter fct main() ";
getValues();
return 0;
}
void getValues()
{
int s1, s2, s3, s4, s5;
cout << " enter five test scores: ";
cout << " ";
cin >> s1, s2, s3, s4, s5;
// ??????
}
void calcAvg (int n1, int n2, int n3, int n4, int n5)
int lowScore;
//???????
//????????
cout << "the average of the four test scores is: " <<avg << endl;
}
int findLow (int x1, int x2, int x3, int x4, int x5)
{
int lowest;
//Dont know code to determine lowest score
return lowest;
}
Explanation / Answer
please rate - thanks #include #include using namespace std; void getValues ( ); void calcAvg (int, int, int, int, int); int findLow (int, int, int, int, int); int main() { cout > s2>> s3>>s4>>s5; calcAvg (s1, s2, s3,s4, s5); } void calcAvg (int n1, int n2, int n3, int n4, int n5) { int lowScore,total; double avg; lowScore=findLow(n1, n2, n3,n4, n5); total=n1+n2+n3+n4+n5-lowScore; avg=total/4.; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.