2 releases
0.1.1 | Aug 27, 2023 |
---|---|
0.1.0 | Aug 27, 2023 |
#1152 in Math
11KB
217 lines
Level 1 Crook Calculator
A package that comes with a library and a binary crate. Library crate provides one function to compute mathematical equations from string slices. Binary crate provides command line interface for this function.
Usage
Binary crate
Build and run the binary, then enter an equation like this:
3 * ( ( 2 + 1 - 1 ) ^ 2 ) / 2 - 3.5
Remember about spaces. Any ammount of spaces or any different whitespace characters to separate numbers and operators.
Library crate
use crook_calculator;
fn main() {
println!("{}", crook_calculator::compute("2 + 2").unwrap());
}
lib.rs
:
Crook calculator
crook_calculator
provides one function to compute
mathematical equations from string slices.