Quote:
Why do I get an expected primary expression before >=
Because there is no implicit repeat of score[0]
if (score[0] <=gradeA & >= gradeB){
if ((score[0] <=gradeA) & ( >= gradeB)){
if (score[0] <=gradeA & score[0] >= gradeB){
if (score[0] <=gradeA && score[0] >= gradeB){
Another problem in your code: if score[0]=gradeA
if (score[0] >= gradeA){
cout << "student 0 score is " << score[0] << " and grade is A";
}
if (score[0] <=gradeA & score[0] >= gradeB){
cout << "student 0 score is " << score[0] << " and grade is B";
}
Code of solution 2 is a cure to this problem.