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.
- Basic addition of Whole Numbers or Decimals.
- Using Bodmass to process multiplication, Division, Addition and Subtraction with brackets.
- The ability to approximate trignometric values.
- The calculator can process trignometric values in equations and solve them.
The calculator shows the user where there may be mistakes when the calculator cannot process a given input.
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





