crook_calculator

Crates.iocrook_calculator
lib.rscrook_calculator
version0.1.1
sourcesrc
created_at2023-08-27 20:54:04.882505
updated_at2023-08-27 21:14:16.328209
descriptionProvides one function to compute mathematical equations from string slices.
homepage
repositoryhttps://github.com/LucasHazardous/crook_calculator
max_upload_size
id956382
size11,626
Lucas Hazardous (LucasHazardous)

documentation

README

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());
}
Commit count: 19

cargo fmt