Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vihlancevk/calculator

First step for create my programming language
https://github.com/vihlancevk/calculator

c learning-task math recursive-descent-parser student-project

Last synced: 15 days ago
JSON representation

First step for create my programming language

Awesome Lists containing this project

README

        

# Calculator
## Program description
A simple calculator that currently supports the following set of operations:
1) addition (+);
2) subtraction (-);
3) multiplication (*);
4) division (/);
5) exponentiation (^);
6) sine (sin);
7) 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.
## Using a calculator
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.