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

PROGRAMMING:Yu Long's arithmetic

Luz5年前 (2021-05-10)题库409
Primary school student Yu Long recently encountered some arithmetic problems. Please help him calculate the results of each formula.
![ Untitled. JPG] (~ / f278966b-60fe-472a-b4e8-05c21e093676. JPG)
###Input format
```
There are several lines, each of which is an expression in the form of a + B. Operators can be +, -, *, / which represent addition, subtraction, multiplication and division respectively. The number and operator before and after may have a number of space separation, subject to ensure that all operands are within 100 natural numbers.
Note: as Yu Long is only a third grade student in primary school, his knowledge of arithmetic is very limited, so when A-B is not enough to subtract, or when a / B is not divisible, or when a / B and B is equal to 0, or when the operator is not one of addition, subtraction, multiplication and division, you need to output the error message: sun shicuowu!
```
###Output format
Output several lines, each line outputs the correct result or error information of an equation.
###Input sample
```in
1 + 2
1- 2
2 *1
2 /1
3/ 2
12 /0
1 ? two
```
###Output sample
```out
three
SuanShiCuoWu!
two
two
SuanShiCuoWu!
SuanShiCuoWu!
SuanShiCuoWu!
```






answer:If there is no answer, please comment