Question: PLEASE READ We are working on making simple C++ programs using Putty I need help understanding how to do the problem below so that I

 PLEASE READ We are working on making simple C++ programs usingPutty I need help understanding how to do the problem below sothat I can do others like it on my own. Thank youin advance! Here is the problem given: Make a program that will

PLEASE READ We are working on making simple C++ programs using Putty I need help understanding how to do the problem below so that I can do others like it on my own. Thank you in advance! Here is the problem given: Make a program that will ask the user for a grade (A, B, C, D or F) and display one of the messages depending on the grade. If the grade is an A or B, display "Good job". If the grade is a C, display "OK" If the grade is a D or F, display "Work harder" For any other letter (the user entered a letter other than an A, B, C, D or F), display "Invalid grade". Use the following structure if the grade is A or B display "Good job" display "OK" display "Invalid" else if the grade is C else HINT if(grade- A ||B) The above if has 3 problems! 1. How do you check equality? - is an assignment operator 2. A . 3. B is not compared to anything. and B are considered variables by the compiler Test your program using the following grades. GradeMessage A Good job Good job OK Work Harder Work Harder X Invalid grade You are going to add more code to your grade.cpp program. Now declare a boolean variable called pass and initialize it to false. Set pass to true if the grade is an A, B or C. In the end of the program, display "Congratulations! You passed the class." if pass is true. If pass is false (the grade was not A, B or C), don't display any message. Use the following structure bool pass; pass false; if the grade is A or EB display "Good job" passtrue; else if the grade is C Display "OK" passtrue //display the congratulation message if pass is true Do not use an else Sample Runl Enter your grade: B Good job Congratulations! You passed the class. Sample Run2 Enter your grade: D Work harder Sample Run3 Enter your grade: X Invalid grade

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!