67 172
Assignments Done
99,3%
Successfully Done
In November 2018

Answer to Question #24386 in C++ for Nour

Question #24386
Write a function that returns A, B, C, D, or F depending on the percentage grade passed to the function. Any grade >= 90 is an A; any grade >= 80 is a B, and so on.
Expert's answer
char getMark(int grade)
{
if(grade >= 90)
return 'A';

else if(grade >= 80)
return 'B';

else if(grade >= 70)
return 'C';

else if(grade >= 60)
return 'D';

else
return 'F';
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions