Module: Character strings: Parsing arithmetic expressions


Problem

3 /4


Arithmetic expression-2

Problem

Write a program that evaluates an expression consisting of three numbers and two characters (allowed characters are «+», «–», «* " and "/"). The input is a character string representing an arithmetic expression. All numbers are integers.  operation «/» is performed as integer division 
 
Examples
# Input Output
1 12*3+45 81
2 12-45/3 -3