This was an assignment that is already past due, but I'd like to get it working anyways so I can see what I'm doing wrong. The program is supposed to take in 5 test scores, find and drop the lowest and calculate the average of the remaining 4. Im getting a " redefinition of formal parameter 'lowScore' ", from my line 76 and I have no idea why. I havent gotten this program to compile ever yet, so there could be other potential issues as well.
#include <iostream>
#include <iomanip>
using namespace std;
//Must use:
// void getScore() / store in a reference param variable, should be called once for 5 entered test scores
// void calcAverage() / calculate and display average of 4 highest test scores
// int findLowest() / should find and return lowest score. Called by calcAverage,
// Input validation, no scores lower than 0 or higher than 100
int main()
{
int score, score1, score2, score3, score4, score5;
cout << "Enter 5 test scores and I will remove the " << endl;
cout << "lowest and average the rest." << endl;
so how should it be written in order to step through the scores to find the lowest, if I cant assign lowScore to score1? I tried just deleting out that line, but then I get a " uninitialized local variable 'lowScore' in line 64 ". Sshould I be using int (lowScore == score1); ?