-->
当前位置:首页 > 题库

PROGRAMMING:+-*/

Luz5年前 (2021-05-10)题库610
Write a program to realize the basic arithmetic operation. Input two numbers and an operator(‘+’, ‘-’ , ‘*’, ‘/’), calculate the result and output it.
### Input:
Input two floating point numbers and an operator seperated by space.
### Output:
If the operator is one of the '+', '-', '*', '/' and the result can be calculated correctly :
Output the fomula and the result, the numbers and operators are seperated by space, and all the numbers remain two digits after the decimal point.
Otherwise, output "Error!"
### Input sample:
```
3.4 + 5.2
```
### Output sample:
```
3.40 + 5.20 = 8.60
```






answer:If there is no answer, please comment