Calculator

You are an employee of a company which produces calculators. Your company is developing an out- standing new calculator, and you are developing the software of that new calculator. This calculator is intended for people that would like to save intermediate values in the memory for future use. For this reason, this new calculator has space for 26 values in its memory, named a to z. Those values are stored with double precision. For simplicity, here we will consider only the four basic operations, sum, minus, multiply and divide (+ − ∗ /). Also, expressions can be grouped with parenthesis. You should consider the precedence of operations, with multiplication and division first, then addition and subtraction. Also, only integer numbers and the letters a to z will appear on the expression, along with the symbols of the operations, the parenthesis and the equal sign for attribution. Input The input consists of an undetermined number of lines, with one expression per line. One expression can be an attribution or a question. If the expression is an attribution it will begin with X=, where X is the letter representing the memory space and a ≤ X ≤ z. If the expression is not an attribution expression, then it is a question. There will be no blank spaces in the expression. You will only produce output for the questions. The input will end with the end of file (EOF). Output For each question, print it’s evaluated value on a line by itself. Print the result rounded to two decimal places. See sample input/output for the exact format. Sample Input x=10 x x+10 x/5 x/2 x/3 y=5/3 y x*y x-y Sample Output 10.00 20.00 2.00 5.00 3.33 1.67 16.67

2/2 8.33