Question #5
Math
The file DATA5.txt has the format of :
number
operation
number
This format is reapated for 0 < x times. Your job is to do the operation to the two numbers on each set. The operations can be one of '+', '-', '/', '*', '^', or '%'. % is moduolse, ^ is expoent. All numbers are ints and all operations should return an int that is truncated if the operation retruns a decimal number. Also the operation '=' can be given where you will output true if the numbers are equal and false if they are not.
Put your output in OUT5.txt
Example
Input(DATA5.txt):
1
+
1
2
-
2
1
*
4
9
=
0
Output(OUT4.txt):
2
0
4
false