Practice With if Statements


Letter grade exercise

The problem: obtain numeric grades and transform them into letter grades. For example:
Numeric rangeLetter grade as output
100-90A
89-80B
79-70C
69-60D
59..belowF

First:
Ask the user ONLY ONCE for a number between 0 and 100 and output the corresponding letter grade. Remember that if you test their input 100 >= x >= 90 you have to do it in two steps: (100 >= x) && (x >= 90)

Now that it compiles and works ask the user for several numbers until the user enters -1 then stop.
Hint: here you use loops... figure out the condition carefully and what goes in the body of the loop before writing the program.