RCCP is a simple command-line calculator written in Rust as an alternative to more conventional GUI calculators. It supports basic arithmetic calculation, and respects the order of operation (BIDMAS/BODMAS/PEDMAS).
+
), subtraction (-
), multiplication (*
), and division (/
).To install RCCP, you can use the rust package manager: cargo.
$ curl https://sh.rustup.rs -sSf | sh
$ cargo install rccp
$ rccp
Or you can build it from source, using the github repository.
$ git clone https://github.com/d3vboi/rccp.git
$ cd rccp
$ cargo run
Keep in mind, if you use this method you will need to be in the RCCP directory to be able to run the program
To use RCCP, simply run the program, then enter an expression at the prompt:
``` $ rccp
2 + 3 * 4 14 exit ``
As we can see in this example, RCCP correctly performs the multiplication before the addition, resulting in the
14instead of
20. You do not need to add spaces in between characters.
> 2+3*4` is also a valid expression.
This project is licensed under the MIT License.