Question: My assignment is to use a switch statement to solve: Create two void functions titled getScore and printGrade with an int argument. The function getScore

My assignment is to use a switch statement to solve:

Create two void functions titled getScore and printGrade with an int argument. The function getScore should have a Reference parameter and printGrade should have a Value parameter.The function getScore will prompt the user for the numerical score, get the input from the user, and print the numerical score. The function printGrade will calculate the course grade and print the course grade. (Be careful and note that the assignment requires you to input the grade into getScore and not directly into the main function.)

The issue is that my code is not giving the correct letter grade

#include #include using namespace std; int score; void getScore(); void printGrade();

void getScore() { cout <<"Please enter your numerical score and your grade will be display "; cin >> score ; cout << "You entered a score of " <

void printGrade() { switch (score) { case 'A': score >= 90; cout << "Your Grade is: A " <= 80; cout << "Your Grade is: B "<= 70; cout << "Your Grade is: C "<= 60; cout << "Your Grade is: D "<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!