ihcsim / rust-calc

A arithmetic calculator written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rust-calc

A rust calculator that can perform a bunch of arithmetic operations. I wrote this program as part of my learning of important concepts like:

To run the program:

➜ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/rust-calc`
Type '?' to see supported operators, 'q' to quit
# ?
Supported operators: [+,-,*,/,]
# 1.0+2.0
> 3
# 3.0-9.0
> -6
# 4.5  / 4.5
> 1
# 6.0 / 3.0
> 2
# 6.0*9.0
> 54
# 1.3456*9.728
> 13.089996799999998
# q

To run the unit tests:

cargo test

About

A arithmetic calculator written in Rust


Languages

Language:Rust 100.0%