Write a script/program that reads a sequence of mathematical expressions from a file and prints the result of evaluating all expressions in the order they appear.
The file consists of a series of expressions, one per line.
Each line is in the format function <value>
. ADD 5
, for example, adds 5 to the current value.
The initial value when the program starts is 0. A file contains maximum ten rows.
The following functions shall be supported: