当前位置:首页 > 题库 > 正文内容

编程题:Infix to Postfix Conversion

Luz5天前题库13
Convert the infix expression to postfix expression.

### 输入格式:

1 line.
A correct expression include +,-,*,/,(,) and integer. Each integer is less than 10 and more than 0.

### 输出格式:

2 line.
The first line gives the result of expression. Keep 2 digits after the decimal point.
The second line gives the postfix expression. Use a blank space to divide every number and symbol. There is a blank space at the end of the line.

### 输入样例:

在这里给出一组输入。例如:

in
2*(3+4)/5



### 输出样例:

在这里给出相应的输出。例如:

out
2.80
2 3 4 + * 5 /








答案:若无答案欢迎评论

分享给朋友:

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。