Task 3 - if ... elseif ... else Statement
- Designate a variable for grades and assign the value to a score of your choice.
- Write an if ... elseif ... else statement for the following:
- If grade is equal to or greater than 90 display, "You've got an A. Excellent work!"
- If grade is between 89 and 80 display, "You've got a B. Great job!"
- If grade is between 79 and 70 display, "You've got a C. Good work!"
- If grade is between 69 - 60 display, "You've got a D. Try harder."
- If grade is equal to or lower than 59 display, "You've got an F. Better luck next time."
(Hint: Be sure to wrap the line you are displaying in paragraph tags, or use a line break or horizontal rule at the end of each line or everything will run together.)
You've got an A. Excellent work!