Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are a tired professor and need help determining the final grades at the end of your C + + Programming course. You decide to
You are a tired professor and need help determining the final grades at the end of your C Programming course. You decide to write a program that converts a numerical grade into a letter grade and corresponding GPA.
Specifications:
You must use a switch statement to solve the problem,
Prompt the user to enter a numerical grade assume it is an integer Then use the following scores to determine the final letter grade and GPA:
tableNumerical Score,Letter Grade,GPAABCDF
Print an error message if the grade is larger than or less than
HINT: Use an ifelse statement to determine if you have an invalid grade, and if so print an error message. Otherwise jump into your switch statement. Additionally, break the grade into two digits and use the switch statement to test the ten's digit.
If you execute the program with the following underlined inputs, the output will be:
First Run:
Welcome to the Grade Calculation Program
Enter Numerical Grade:
Error: Invalid Numerical Grade
Second Run:
Welcome to the Grade Calculation Programming
Enter Numerical Grade:
Letter Grade: B
GPA:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started