Answer to Question #21046 in C++ for muna

Question #21046
Program using stacks and queues c++

You will implement a calculator using stacks and queues. Your calculator must support the following operators:

* Addition
* Subtraction
* Multiplication
* Division
* Modulo
* Parenthesis

The input will be given in the form of infix expressions, e.g. ( 2 + 3 ) * 5. Implement parenthesis checking to ensure that the input is a valid expression. If the expression is not valid, output an error message. Convert the checked infix expression it into a postfix expression ( e.g. 2 3 + 5 * ). Use a stack for the infix to postfix conversion. Store the resulting postfix expression in a queue and print it onto the screen. Then, using a second stack, evaluate the postfix expression and print the result. Include a README file describing how to run your program and give an example
1
Expert's answer
2012-12-20T10:56:27-0500

Unfortunately, your question requires a lot of work and cannot be done for free.
Submit it with all requirements as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS