Muhammad Ahsan

Muhammad Ahsan

  • 1.4k
  • 265
  • 6.3k

How to do Infix to Postfix Conversion of Negative Number.

Oct 28 2020 11:27 PM
I'm trying to convert infix to postfix like that (-22 + 3) = -22 3 + but my InfixtoPostfic function gives me the output like that  (22 -3+) which is hard to read for my evaluation function. I want to read a multi-digit negative number so it's easy to evaluate. I am not really sure where the problem is though. Below I have included all of the code needed. Any tips would be greatly appreciated!