Google | Phone | Solve series of arithemetic equations
Anonymous User
3923

Google | Phone | Solve series of arithemetic equations

Given series of arithematic equations as a string:
A = B + C
B = C + D + 5
C = 4
D = 6
The equations only use addition and positive numbers and separated by newline.

Print value of each variable:
A = 19
B = 15
C = 4
D = 6

Any ideas.

Comments (18)