Negative Numbers are Annoying
We'll cover the following...
What’s the absolute value of -5? The answer is 5. So, Rust should say the same thing, right? Let’s find out!
Press + to interact
fn main() {println!("x == {}", -5_i32.abs());}
If you’re expecting the output of this program to be x == 5
, ...