0
2.1kviews
Convert following expression into postfix and prefix.
written 5.8 years ago by | • modified 4.8 years ago |
a) (A-B)* (C+D)
b) (A + B) / ( C + D) – ( D * E)
ADD COMMENT
EDIT
1 Answer
written 5.8 years ago by | • modified 4.8 years ago |
a) (A-B)* (C+D)
b) (A + B) / ( C + D) – ( D * E)
written 5.8 years ago by |
infix to postfix :
a) (A-B)*(C+D)
[AB-]*[CD+]
AB-CD+*
b) (A + B) / (C + D) – (D * E)
[AB+] / [CD+] – [DE*]
[AB+CD+/] – [DE*]
Infix to prefix:
a) (A–B) * (C+D)
[–AB] * [+CD]
*–AB+CD
b) (A + B) / ( C + D) – ( D * E)
[ +AB ] / [ +CD ] – [ *DE ]
[ /+AB+CD ] – [ *DE ]
–/+AB+CD*DE