Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Please include comments on your code. Correct solution or something similar to a correctr solution will receive a thumbs up. Thanks. 1. Introduction You
C++
Please include comments on your code.
Correct solution or something similar to a correctr solution will receive a thumbs up. Thanks.
1. Introduction You need to create a C++ program that can evaluate a list of arithmetic expressions whether they are valid. You also need to compare them if they are similar 2. Input and Output The input file is a regular text file, where each line is terminated with a In' character. Each line will contain an arithmetic expression. 1. Expressions consist of numbers (0-9), lowercase alphabets (a-z), uppercase alphabets (A-Z), '+', -, (', Y,i, Y, T', and T'. An operand (numbers, and alphabets) will not appear the second time in a single expression. 2. You need to check whether the expression is valid or not. An expression will be invalid if opening and ending parenthesis doesn't match. If an expression is not valid, the output will be "Error at:"+expression number, see examples to clarify about the format and expression number, then continue to process next expression. Note, in "Error at:", there is a space after colon( 3. If there is no error with the expressions, you need to compare those expressions. If they are similar, then the output will be "Yes", otherwise "No" All records should be processed sequentially from beginning to endStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started