Skip to content

higueraDev/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A basic calculator using Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages