A simple calculator that currently supports the following set of operations:
- addition (+);
- subtraction (-);
- multiplication (*);
- division (/);
- exponentiation (^);
- sine (sin);
- cosine (cos).
New mathematical operations are easily added to this calculator (for example, taking the square root sqrt), since it is implemented using a recursive descent algorithm.
It is necessary to write the expression whose value needs to be calculated to a file data.txt (the logic of the calculator includes the standard priority of mathematical operations, as well as the ability to change the priority of operations using parentheses ()), you need to take into account that each expression must end with the $ symbol. Next, run the file for execution main.cpp, after which the calculated value will appear on the screen.