I have found numerous examples involving only arithmetic operations but mine requires to deal with functions - min(x, y), max(x, y), sqrt(x), abs(x), fact(x). What I don't understand is how my program can interpret those functions and set the precedence for them.

Examples:

4 + 5 -> 4 5 +

abs(‐5) -> ‐5 abs

120 – (45+3) -> 120 45 3 + ‐

(3^2 + 4^5)*fact(3) -> 3 2 ^ 4 5 ^ + 3 fact *

min(3‐(4‐7) , (2+4)/3) -> 3 4 7 ‐ ‐ 2 4 + 3 / min

The code below is one of the examples I found on the internet. Since I'm dealing with functions, I guess I'll have to use an array of char so I can read functions but I'm having trouble where to start. Thanks for your help.

[edit] I have an idea came up. Still not sure about the precedence of function, but please leave your input. I'll be back in few moments ;p

*Edited 5 Years Ago by gyuunyuu*: Changing approach since my post. Be back again ;p