0

I'm supposed to write a program in C++ to show someone a grade criteria. I need some major help with it! I'm so so so confused! :(

here is my assignment. please help me!

A >= 90
B >= 80
C >= 70
D >= 60
F < 60

The example output is given below. The user input is in BOLD. Notice that for any other letter, which is not in grade criteria, the program displays “Invalid Grade”

Example Outputs

Enter the Letter Grade: A
The score is in the range of 90 to 100

Enter the Letter Grade: B
The score is in the range of 80 to 89

Enter the Letter Grade: C
The score is in the range of 70 to 79

Enter the Letter Grade: D
The score is in the range of 60 to 69

Enter the Letter Grade: F
The score is less than 60

Enter the Letter Grade: G
Invalid Grade!!

Enter the Letter Grade: I
Invalid Grade!!

PLEASE PLEASE PLEASE HELP

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Akill10
0

All you need to do is a simple IF statement. Print the "Enter the Letter Grade: " and get the users input. Then run though an IF statement to get the scores. I can't see what is so hard about it though.

Do you have to make a GUI or anything or are you just using the console?

0

You will need to accept an input from the user.
Then simply compare that input for each grade.
e.g.

if(input.equals("A"))
{
//..print the message for the A grade.
}
//etc...

Edited by Akill10: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.