How to create a calculator that gets a string as an input. for example "2+3*4-(4+5)*3"?
Anonymous
Have two stacks(LIFO). one stacks holds all the mathematical actions. The other stack holds the numbers. Take out 2 top most numbers and do the first topmost math action and push result back into the stack
Check out your Company Bowl for anonymous work chats.