int findLowest(int scoreArray [5]) // You forgot the semicolon
1 2 3
int getScore(int, int, int, int total); // this function takes 4 integers right?
testScore = getScore(testScore, i , total); // Here you only pass 2 stuff.
int findLowest(int scoreArray [5]) // Remvove the number 5, you cant do that. Remove it from the definition aswell, if you want to send in the size send it in as an integer separately
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
int getScore (int testScore, int i, double total)
{
cout <<"Please enter your score for exam" << i;
cin >> testScore;
}
{
while (testScore < 0 || testScore > 100)
cout <<"Please enter a valid score. Try Again."<< endl;
cin >> testScore;
}
total += testScore;
return testScore;
The while loop and everything after is outside the function, you most likely want them inside.
1 2 3
for (int i = 1, i < 5, i++) // You seperate them by semicolon, not colon.
for(int i = 1; i < 5; i++) // like that
I just seemed to have overlooked it. I am in way over my head with this class. This is very difficult to me. I do have just one more with this program . I keep getting an error.
int getScore(int, int, int, int total); // this function takes 4 integers right?
testScore = getScore(testScore, i , total); // Here you only pass 2 stuff.
Oh I didint look too clearly, it takes 4 arguments, but you're only sending in 3. If you are sure you only want to send in testcore, i and total. Then remove the 4th one from the protoype so it looks like this
int getScore(int, int, double total);
And where you write the actual function it should look identical.