- 3

can anyone help me to solve this postfix expression.. 2 $ 3 + 5 * 2 $ 2 - 6 / 6 ?

i don't know where to start and what to do please help me to solve this.

13th Nov 2019, 3:09 PM
Jay Parmar
Jay Parmar - avatar
8 Respostas
+ 3
Jay Parmar hi. Your question is incomplete. You have not shown any code or specified the programming language you are using.
13th Nov 2019, 6:15 PM
Manual
Manual - avatar
0
show us your efforts
13th Nov 2019, 3:11 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
i tried to do following.. 2$3=8 8+5=13 13*2=26 26$2=776 776-6=770 770/6=128.33 but as per this, this is infix express evaluation but given question is to evaluate postfix expression..
13th Nov 2019, 3:21 PM
Jay Parmar
Jay Parmar - avatar
0
I think, that first numbers will be multiplied and divided, and then added and subtracted. if you do not use brackets in the expression. by default, operators will be prioritized
13th Nov 2019, 3:34 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
and what does this $ sign mean ?
13th Nov 2019, 3:36 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
that's the main problem i correctly don't know but may be it's for exponential
13th Nov 2019, 3:36 PM
Jay Parmar
Jay Parmar - avatar
0
What programming language you use?
13th Nov 2019, 6:17 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
The only language I know that uses the dollar operator is Haskell and in Haskell it basically means “evaluate the right side first” If it’s exponentiation, though, then you messed up the order of operations. It would be (2**3) + 5(2**2) - (6/6) 8 + 5(4) - 1 8 + 20 - 1 28 - 1 27
14th Nov 2019, 12:27 PM
Rora