I have to convert..
X=A+((B+C)*D)-E
to reverse polish notation
I think it's...
BC+D*A+E-
Is this correct?
Printable View
I have to convert..
X=A+((B+C)*D)-E
to reverse polish notation
I think it's...
BC+D*A+E-
Is this correct?
Yes.
However, it's probably tricky to implement that in assembly language without even knowing for what platform... ;)
Thank you. I also completely do not understand this problem...
Write a program to evaluate the arithmetic statement using a general register computer with three-operand instructions
X = A*(B + C) + D / E* F +G
Well, the actual problem is quite common and I'd say it's on an intermediate level. I could write a program for it without any notable problems if only I'd know in which concrete language to write it.
Now this is a bit more of information about your target platform, yet not enough. Haven't you been given a more detailed description of the hypothetical target platform? Perhaps there's sort of an academic standard hypothetical platform that refers to, but in this case I don't know it, and I didn't find anything on Wikipedia either.Quote:
[...] using a general register computer with three-operand instructions