Question: Please write the code in c++. je: 11:59pm on Thursday, January 26 rogram Purpose - Check relational expressions for correctness. The program should accept relational

Please write the code in c++.

Please write the code in c++. je: 11:59pm on Thursday, January 26

je: 11:59pm on Thursday, January 26 rogram Purpose - Check relational expressions for correctness. The program should accept relational expressions input from the standard input device (using cin) in the format integer arithmetic-operator integer less-than-or-greater-than-symbol integer Assume that the user will input expressions in this format, entering only integer values for the numbers, and single characters for the arithmetic and relational operators. If the arithmetic operator entered is not a valid C++ arithmetic operator (+,, *, /,% ) the program should output "Unrecognized arithmetic operator" followed by the character input where an arithmetic operator was expected (see examples below). If the relational operator entered is not , the program should output "Unrecognized relational operator" followed by the character input where a relational operator was expected (see examples below). The program should determine if the expression entered is a true statement. If the expression is a true statement, output the relational expression followed by " - Correct". If the expression is a false statement, output the relational expression followed by " - Incorrect". Example input/output pairs Input: 3+4>1 Output: 3+4>1 - Correct Input: 12%728 Output: Unrecognized arithmetic operator Input: 373 Output: Unrecognized relational operator * After each relational expression entered, the user will input 'c' to continue (to enter another relational expression) or ' q ' to quit. The program should read each input relational expression and produce the corresponding output as described above until the user enters q. After the user enters q, the program should output a summary of the results in the format: number-correct of total-number-of-expressions = percent-correct\% The percent correct should display with two places following the decimal

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!