Grade to GPA
mediumQuestion 337Read a letter grade character (A, B, C, D, or F) with scanf and print the matching GPA to one decimal place using %.1f, with no trailing newline:
A -> 4.0, B -> 3.0, C -> 2.0, D -> 1.0, F -> 0.0.
For input A the output is 4.0; for C it is 2.0; for F it is 0.0.
Expected output
4.0= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics
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 (p, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.