I have to write a code to calculate a final grade for our class and it asks a few questions about your grades then it calculates. The problem lies that is if you take more than 2 quizzes then the code is suppose to drop two of the quizzes, but it's not and I think it has something to do with my "If" code.
When using this line if (quizsum < 2){, I ask it to calculate the final grade with only 2 quiz scores and it gets it right, but when I try it with say like 5 quiz scores it doesn't even ask me about the lowest 2 scores?
Here's the rest of the code. Please don't be too hateful on the repetitiveness/simplicity of the clue, it's only my 2nd week in the course.
if (quizsum < 2)
{
cout << "Enter the scores of the lowest 2 quiz scores:";
...
}
// Substitute 5 for quizsum
if (5 < 2)
{
cout << "Enter the scores of the lowest 2 quiz scores:";
...
}
Now, do you understand why it does not ask about the lowest two scores?
Okay so I went through and replace the first If statement from if (quizsum < 2) to if (quizsum > 2) but now whenever I try that the code then asks the user about the lowest quiz scores if they only have 2 quizzes.