binary tree programming algorithm

i want to make a program code that can count these numbers. ive already done the inorder,traversal and outorder of

1 2 + -3 /

But,i dont really know how to calculate it in the same manner. For example,the outcome will be
preorder:/ + 1 2 - 3
inorder:1 + 2 / - 3
postorder:1 2 + - 3 /
result:-1.00000

preorder:/*+1.5 4.3 2-8.1 0.9
inorder:1.5 + 4.3 * 2 /8.1 - 0.9
postorder:1.5 4.3 + 2 * 8.1 0.9 - /
result: 1.6111

im grateful if you can help. thanks for reaading.
Last edited on
Topic archived. No new replies allowed.