well i am taking c++ in college having a bit of difficulty on grasping it a bit basically im just wondering if someone could take a look to see what im doing wrong in this i would appreciate the help and criticism. like i said it is a class project so this is the project in detail:
Lowest Score Drop
Write a program that calculates the average of a group of test scores, where the lowest
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
parameter 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 high-
est 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 0 or higher than 100.
(Starting Out with C++: From Control Structures through Objects, 6th Edition. 03/19/2008: Addison-Wesley, 03/19/2008. 377).
using namespace std;
// function prototype
char restartProgram; // restarting program for next set of grades
cout << "This Program will average\n";
cout << " the test scores you input, \n";
cout << "and will drop the smallest grade." << endl;
void getScore(int sum)
int sum = 0;
for(count = 1; count <= 5; count++)
cout << "Enter test score number " << count << endl;
cin >> testScore;
if(testScore < 0 || testScore > 100) // make sure real test number
cout << testScore << " is an invalid entry. Please input correct score.\n";
sum += testScore;
thanks in advance for even givin this a peek