Skip to content

vihlancevk/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published