quote:
Originally posted by PiP
Using a stack (or two) and convertng the equation from infix to postfix (or prefix) notation, might make it a hell of alot easyer to evaluate
true, but that wouldn't give the wanted result in steps (or you need to reverse everytime from postfix to infix....
DJeX, the easy way of doing it is to write a normal calculation program (by using infix only!) and instead of just outputting the result as you normaly would, also output the results in between, because they will be exactly what you want...
Also, if you are not familiar with recursive routines, you may want to learn/check that out first! Because you will need them....
Tip: and the very first check you need to make to avoid inproper input is to check if you have equaly the amount of "(" as the amount of ")"...