[Solved]Need Fix Code Run Gives Error Message Showing Functionscpp Function Char Determinegrade Do Q37088258
I need to fix this code, when I run it, it gives me the errormessage showing below:
functions.cpp: In function ‘chardetermineGrade(double)’:
functions.cpp:24:19: error:expected ‘,’ or ‘;’ before‘g’
char grade = ‘F’ g;
^
functions.cpp:37:9: error:‘g’ was not declared in this scope
return g;
code:
char determinGrade(double finalAvg)
{
char grade = ‘F’ g;
if(finalAvg>=MIN_A)
{
grade=’A’;
}
else if(finalAvg>=MIN_B)
{
grade=’B’;
} else if(finalAvg>=MIN_C)
{ grade=’C’;
}
return g;
}
Expert Answer
Answer to I need to fix this code, when I run it, it gives me the error message showing below: functions.cpp: In function ‘char … . . .
OR

