HCPC0014 - Simple Calculator
You are given an arithmetic operator then two integers a, b you have to print the result of : a operator b
Input
first an integer t denoting the number of test cases (0 < t < 100), then t test cases follows , each in one line contains a character op from the set {'+', '-', '*', '/'} then a space then two positive integers a, b separated by a space (less than 1000)
Output
for each test case output the result of a op b .
Example
Input: 4
+ 1 2
* 5 6
/ 5 1
- 1 7
Output:
3
30
5
-6
Added by: | Mostafa 36a2 |
Date: | 2014-07-20 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |