Postfix Evaluation And Conversions

easy
1. You are given a postfix expression.
2. You are required to evaluate it and print it's value.
3. You are required to convert it to infix and print it.
4. You are required to convert it to prefix and print it.

Note -> Use brackets in infix expression for indicating precedence. Check sample input output for more details.

Input Format

Input is managed for you

Output Format

value, a number infix prefix

Constraints

1. Expression is a valid postfix expression
2. The only operators used are +, -, *, /
3. All operands are single digit numbers.

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
264*8/+3-
Output
2
((2+((6*4)/8))-3)
-+2/*6483
Previous
Infix Conversions
Next
Prefix Evaluation And Conversions

Related Questions