Question: Given a variable grade of type char that has been given a value and a variable points of type int assign 4 to points if
Given a variable grade of type char that has been given a value and a variable points of type int assign to points if grade is A
or a to points if grade is B or to points if grade is C or to points if grade is D or d or E or e to points if
grade is F or f and to points in any other case. Use a switch statement to make the assignments.
Use break appropriately to combine cases. That means you won't get credit if you used more than six assignment statements. Also
there should be no other code besides a switch statement. No if statements, for example and no code outside the switch
statement.
Additional Notes: grade should not be modifiedGiven a variable grade of type char that has been given a value and a variable points of type int assign to points if grade is A
or a to points if grade is B or to points if grade is C or to points if grade is D or d or E or O to points if
grade is F or f and to points in any other case. Use a switch statement to make the assignments
Use break appropriately to combine cases. That means you won't get credit if you used more than six assignment statements. Also
there should be no other code besides a switch statement. No if statements, for example and no code outside the switch
statement.
Additional Notes: grade should not be modified
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
