I'm working on a program called Grading Program that I found in the Article section on this forum. So I need to create a program that allows the user to enter the grade scored in a programming class (o-100) that notify the user the grade letter A, B, C,D, F. I've tried reading the tutorials on here and this was my last option to ask for help, but I am stuck. If you can give an explanation on what I'm doing wrong, or any tips that will lead me in the right direction that will be great. I'm doing this because I forgot how to program, I just got back into it. Just trying to refresh my memory by reviewing an attempting to complete the Beginner Exercises that was provided in the Articles Section on here. Thanks.
You seem to be mixing up the two unrelated concepts of switch-case structures and if-else structures. You do not need switch-case for this task. Also, you do not need the && or || operators for this task ;)
LB & Kevinkjt2000 I just thought I needed it because it's part of the requirements for this type of program as it says here.
http://www.cplusplus.com/articles/N6vU7k9E/
. Although I would like to know the other option that kevinkjt2000 brought up. "but if you would like a challenge you should try not using them."
What do you mean LB? "You seem to be mixing up the two unrelated concepts of switch-case structures and if-else structures."
If statements when the condition statement is true it will execute. So if and else if would give another option just incase the first if statement isn't true, it would skip the condition that is false until it finds the condition statement that is true, which will execute.
Switch Statements, is when you are switching an identifier, and which ever statement in one of the cases are true will execute.
This is just for my understanding to make sure I'm in the right track. Please feel free to correct me, because that's what I want. Anyways thanks guys :)
Thank you this actually helped alot. I understand why you did score/10 because you begin with case 10 going down from there. Which makes ten being 100 and six being 60. Also, for Else statement, that's cool that you could use a switch underneath the else statement. I always assume you could only use cout statements, and not a control structure. Good to know in the future thanks :)
Thanks again JLBorges it make sense now. I guess I need to review control structures again on the tutorial section to make sure I deeply understand it.