Learn Computer Science programming - C# and C++ Algorithms


PostFix expressions

In arithmetic expressions, you can represent the expression "x + y*(c - d )+ e" as "xycd - * + e +". It is best to read it backward. Begin by adding e to (add (Multiply (c - d) and y) to x). Other examples include:

a+(b+c) --> abc++
(a+b)+c --> ab+c+
a-b*c --> abc*-
(a/b)*(c/d) --> ab/cd/*
a/(b+c*d-e) --> abcd*+e-/
a-b*c+d/e --> abc*-de/+
Click here to upload file