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

PROGRAMMING:Simple calculation

Luz5年前 (2021-05-10)题库499
This topic requires reading in two integers a and B, with an operator in the middle (one of the integers: +, -, *, /,%), programming to calculate the value of the expression.
###Input format:
For integers within the range of two integers, the operator is located in the middle of the two integers, and there is no separator between them.
###Output format:
If the input is 8 -- 6, the output expression value, the format is: (8) - (- 6) = 14. If the second number is zero and / or% operation is performed, the error message will be output: error
###Input sample 1:
```in
-1353%-5
```
###Output sample 1:
```out
(-1353)%(-5)=-3
```
###Input sample 2:
```in
-1353%0
```
###Output sample 2:
```out
(-1353)%(0)=Error
```






answer:If there is no answer, please comment