Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 610 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 610 Bytes

Basic expressions calculator

This is an algorithm for calculate many operations at the same time, at the last update is not possible to use parenthesis.

So an example could be:

12+2-3+12/2*5

The result would be

--- Details ---
2*5: 10
12/10: 1.2
12+2: 14
-3+1.2: -1.8
14-1.8: 12.2
--- Done ---
The result is: 12.2

As we can see the details displayed, the expression is resolved in order of "Math Order of Operations":

  1. Multiplication
  2. Division
  3. Addition
  4. Subtraction

This respository will be updated on the way of my learning path. So I'll be adding features or improvements.