Skip to content

Kmedria/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

This Calculator is 1 cpp file that allows the user to enter lines of 127 chars and then reads those charecters as a line of maths and outputs the result.

The caculator can process +- * (as multiply) and / (as divide) and basic trig such as sin(), cos() and tan(). The calculator follows BODMAS and users can use brackets too. Decimals must be used with a '.' rather than a ',' : so like 1.1 not 1,1.

If the calculator cannot recognise a part of the equation than it will not output any result and ouput an error alongside with an arrow that shows the character that caused the error. The user can then tell what part of their equation has issues.

The images below show a couple sample equations I created and the responses from the caluculator. The calculator has not undergone any rigorous testing as of yet.

image

  • Basic addition of Whole Numbers or Decimals.

image

  • Using Bodmass to process multiplication, Division, Addition and Subtraction with brackets.

image

  • The ability to approximate trignometric values.

image

  • The calculator can process trignometric values in equations and solve them.

image

The calculator shows the user where there may be mistakes when the calculator cannot process a given input.

image

Finally, The calculator is aware of mathematical rules and will flag when they are broken.

In the future, I may add log, ln, variables and differentiation, but for now this project will not recieve any updates, in the foreseeable furture.

  • Mehdi Jaffri

About

A simple program that does math.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages