Answered step by step
Verified Expert Solution
Link Copied!

Question

00
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 write a

image text in transcribed
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 GPA. Specifications: You must use a switch statement to solve the problem. Prompt the user to enter a numerical grade (assume that it is an integer). Then use the following scales to determine the final letter grade and GPA: Letter Grade GPA 4.0 Numerical Score 90 - 100 80 - 89 70 - 79 60 - 69 0 - 59 3.0 2.0 1.0 D 0.0 Print an error message if the grade is larger than 100 or less than 0. HINT: Use an if - else statement to determine if you have an invalid grade. If you have an invalid grade, 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: > main.o Welcome to the Grade Calculation Program Enter Numerical Grade: -67 Error: Invalid Numerical Grade > main.o Welcome to the Grade Calculation Program Enter Numerical Grade: 88 Letter Grade: B GPA: 3.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions