Help – for both of my for header components, error reads the following, but I do not understand how to fix this because I am not sure what is wrong about it. Please help.
warning C4552: '>' : operator has no effect; expected operator with side-effect
void inputGrades (int numStudents,int numGrades)
{
for(numStudents > 0; numStudents -= 1;)
{
cout << "For this student enter the grades.";
double score = 0;
double grade, avg;
int exams = numGrades;
for(exams > 0; exams -= 1;)
{
cout << "Grade: ";
cin >> grade;
score += grade;
}
avg = static_cast<double>(score) / numGrades;
cout << "The average test score for the student is: " << avg << endl;
}
}
int main()
{
int students, tests;
cout << "Enter the number of students: ";
cin >> students;
cout << "Enter the number of tests: ";
cin >> tests;
inputGrades(students, tests);
cout << endl;
return 0;
} // end main