Programming Course in C# ¡Free!

11.03 - Queue Stack Reverse Polish Notation

 Saturday, April 06, 2013 published by Exercises C#

Create a program that reads from a text file one expression in Reverse Polish Notation like, for example:

3 4 6 5 - + * 6 +

(Result 21)

Each item will be stored in a queue.

Once the queue has all the items stored, you will have to store them from the queue to a stack (using class Queue and Stack provided in C#).

Finally, you will operate with the stack in order to get the correct result of the expression in RPN, and you will show it by console.