so I'm having trouble figuring out what my issue is with it the output needs to be something like "Result 1: 55.00 Grade P"
I'm a beginner so any help would be highly appreciated during this time of struggle, thanks
for(int a=0;a< 10;a++)
{
cout << "Result " << a+1 << " " << score[a] << " " << determine_grade(score[a]) << "\n";
}
system("Pause");
}
char determine_grade(double a)
{
char grade;
switch(grade)
{
case(1):
if (a >100)
cout << "Invalid Input!";
case(2):
if (a >= 90)
grade = 'A';
break;
case(3):
if (a >= 70)
grade = 'B';
break;
case(4):
if (a >= 60)
grade = 'C';
break;
case(5):
if (a >= 50)
grade = 'P';
break;
default: grade = 'U';
}
cout << grade;
}