CJCoding With Joseph
15free / daySign inCreate account

Grade with Plus or Minus

The variable score is a test result from 0 to 100. Print the letter grade with a modifier. First decide the letter as usual: A for 90 and above, B for 80 to 89, C for 70 to 79, D for 60 to 69, F below 60. Then, for the letters B, C and D only, look at the last digit of the score (score % 10): 7 or more adds +, 2 or less adds -, anything else adds nothing. A and F never get a modifier. Build the result in a variable called grade and print it on its own.

Expected Output:

B+

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.