Question: The Program Segment A should determine the grade based on the score earned by the student. However, its not working correctly. Explain why this situation

The Program Segment A should determine the grade based on the score earned by the student. However, its not working correctly. Explain why this situation happen. Rewrite the Program Segment A correctly by using if-else-if statement in C++.

if (score >= 50.0) grade = 'E'; else if (score >= 60.0) grade = 'D'; else if (score >= 70.0) grade = 'C'; else if (score >= 80.0) grade = 'B'; else if (score >= 90.0) grade = 'A'; else grade = 'F'; grade = 'F';

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!