for (not sure how use to apply this logic...)
Grade=studentGrade[h];
if (studentMark[h]>=(average+10))
cout<<"A"<<Grade;
if (studentMark[h]>=(average+5))
cout<<"B"<<Grade;
if (studentMark[h]>=(average-5))
cout<<"C"<<Grade;
if (studentMark[h]>=(average-10))
cout<<"D"<<Grade;
else
cout<<"F"<<Grade;
}
average = total/numOfStudents;
cout<< "Student Name "<<" Student Score "<<" Student Grade\n";
for (int h =0;h< numOfStudents; ++h)
{
cout<<" "<<studentName[h]<< " "<<studentMark[h]<< " "<<studentGrade[h]<<"\n";
}
cout<<"\nThe class average is: "<<average;
cout<< "\nThe number of students enrolled is: "<<numOfStudents<<"\n";
cout<<"\nThe minimum mark graded is: "<<lowGrade<<"\n";
cout<<"\nThe maximum mark graded is: "<<highGrade<<"\n";
system("pause");
}
I am having a problem with the "for loop"... for assigning a letter grade after program runs!