Postfix Expression Evaluation Troublesome(PEET)
Domanda
I have converted my infix into postfix expression, which is
3*(4+5)/10-1 into 345+*10/1-
How we can read 10 from postfix expression, because string length function reading just 1 instead of 10 and there is also a following case more that
3*(4+0)/10-1 into 340+*10/1- how we can differentiate that,
is 40 is forty or four zero and same case with 10 or one zero
I am using turbo c++
Soluzione
Please place a white space between (or whatever delimiter) numbers.
3 4 0 + * 10 / 1 -
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow