Created
May 19, 2023 20:48
-
-
Save henryobiaraije/f5e57524f3880b16f59bb93a8f0db2f0 to your computer and use it in GitHub Desktop.
How to use the Calculator Crate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Full video tutorial here https://www.youtube.com/watch?v=LJppDNH2CHI | |
use calculator::Calculator; | |
fn main(){ | |
let mut calculator = Calculator::new(); | |
calculator | |
.add([4.0,10.0,20.0].to_vec()) | |
.subsctract([100.0].to_vec()); | |
println!("result is {}",calculator.get_result()); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment