I am writing a console which acts as a very simple calculator where the user types a math question (e.g. 7 + 6 ) and the program returns the answer. The console would like some thing as the following:
enter Input: 7 + 6 * 2
Output is: 19
What is the best way to read the input line (i.e 7 + 6 * 2). The expression "7 + 6 * 2" could appear any where in the input line.
Thanks in advance
Why are you re-asking this question when your same question asked yesterday was fully answered hours ago?:rolleyes:
Locking this post. Please send me a private message if I'm missing something obvious, for instance that this is not in fact the same question as previous for some reason.