The Broken Calculator
Time Limit: 1 sec
The Problem
This is 2095, Omega Uni-signed Tech Source wrote a book (Named as "Outsbook") with the theory of negative existences in all positive things in the year 2075. The book was sold more than million pieces for its highly intellectual thoughts. Pitu is one of the die hard fans of Outsbook, recently has discovered some problems in his super calculator. He noticed that the addition performing button (+) is not working at all. He found it a little interesting. He knew the thoughts of Outsbook. But as he is not so good in programming as you are, he asked for a little help. You have to make a program that makes his all equations working with plus '+' signs in his broken calculator. You will be the greatest hero of new era, as you can implement the myth theory of Outsbook.
The Input
You will have algebraic expression with two values M and N having a sign (either '+' or '-') between ( 0<M,N<100). Program will have several test cases. Program will stop for both M==N==0.
The Output
For each test case, output is a single line with the working form of the equation for Pitu's broken calculator and the solution of the equation. See the sample input output for clarification.
Sample Input
3 + 5
6 - 2
99 + 1
0 + 0
Sample Output
3 - ( - 5 ) = 8
6 - 2 = 4
99 - ( - 1 ) = 100
Note: all the characters are space separated.
For example in 1st input,
3♦+♦5
Output:
3♦-♦(♦-♦5♦)♦=♦8
spaces are replaced with ♦ for easier look.
[School Level]
1st Online Programming Contest 2016 by Outsbook
Problem Setter: Saiful Islam Niloy
Special thanks to: Priash Chowdhury