← Back
Code Challenge 2.9 - Letter Grade Calculator
Objective
Write a program that takes a numerical grade as input and converts it into a letter grade.
Skills to Practice
- Branching with selection statements
Challenge Tasks
- Create a console project named Challenge 2-9.
- Prompt the user to enter a numerical grade between 0 and 100.
- Based on the numerical grade, print out the corresponding letter grade using the following criteria:
- A for grade 90 to 100
- B for grade 80 to 89
- C for grade 70 to 79
- D for grade 60 to 69
- F for grades below 60
Bonus Challenge: Expand the program to include + and - grades (A+, B-, etc.).
Sample Output
Enter your grade: 85 [Enter]
Your letter grade is: B