Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

On checking the grade of a score, one can get the C grade if the score is at least 40; otherwise the grade is F.

On checking the grade of a score, one can get the C grade if the score is at least 40; otherwise the grade is F. The student can reach the B grade if the score is at least 60. The student can achieve the A grade if the score is at least 80.

Assume that the input score must be a valid int value within the range 0 to 100.

Mary has written a program inside the answer box below. With the program she would like to check an input score and print the grade. However, her code has some troubles (For example, if the score is 100, the output grade is C).

Your task: Please rewrite to provide the correct code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started