Loading…
A calculator evaluating parenthesised expressions with a customisable operator alphabet.
The project consists in writing a calculator able to understand an expression written the way you would write it on paper, with parentheses and precedence. An amusing twist: the operation symbols are not fixed in advance, they are handed to the program at launch. So you have to write an engine, not a series of cases.
A calc binary evaluating, in infinite precision and in an arbitrary base, a parenthesised arithmetic expression with precedence — the base and the six operator symbols being given as arguments, the expression being read from standard input.
READING SOURCE…