Question: Grab an expression from the user and evaluate it. The expression can contain +-/*( ) The expression will not contain any spaces. All the numbers
Grab an expression from the user and evaluate it. The expression can contain +-/*( )
The expression will not contain any spaces. All the numbers will be single digit (between 0 and 9). No error checking is necessary.
Example:
Give me an expression: 2*(6-3)
What will be displayed on the screen
Postfix expression: 263-*
Answer: 6
Do not use any of the built-in stack functions. Convert to postfix and evaluate. Code in Java.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
