Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I make Your marks are between 90 and 100 display in this C++ code? It seems to be running fine except without Your

How do I make "Your marks are between 90 and 100" display in this C++ code? It seems to be running fine except without "Your marks are between 90 and 100" displaying.

#include #include #include "CalculateMarksHeader.h" int main() { calculateMarksMenu(); } #include using namespace std; void calculateMarksMenu(); char inputChoice(); void displayMenu(); char inputYNChoice(); void quit(); void display(string message); void displayMarks(char letterGrade); void displayAMarks(); void displayBMarks(); void displayCarks(); void displayDMarks(); void displayFMarks();

#include "CalculateMarksHeader.h" #include

void calculateMarksMenu(){ char ch = ' '; while (ch!='Q'){ displayMenu(); ch=inputChoice(); displayMarks(ch); }

} void displayMenu(){ cout<>ch; ch=toupper(ch); while (ch!='A'&&ch!='B'&&ch!='Q'&&ch!='C'&&ch!='D'&&ch!='F'){ cout<<" Please enter a valid choice "<>ch; ch=toupper(ch); } return ch; } void quit(){ cout<<("Good Bye !")<

}

void display(string message){ cout<

void displayMarks(char letterGrade){ //use a switch / case statement //to branch to the correct displayMarks method

//So if input is 'A' displayAMarks() should be called } void displayAMarks(){ display("*********************************"); display("Your marks are between 90 and 100"); display("*********************************"); } void displayBMarks(){ display("*********************************"); display("Your marks are between 80 and 89"); display("*********************************"); } void displayCMarks(){ display("*********************************"); display("Your marks are between 70 and 79"); display("*********************************"); } void displayDMarks(){ display("*********************************"); display("Your marks are between 60 and 69"); display("*********************************"); } void displayFMarks(){ display("*********************************"); display("Your marks are below 60"); display("*********************************"); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

What would your clients like you to do more of/less of?

Answered: 1 week ago