Created
February 1, 2022 17:41
-
-
Save sayrer/4bdb2e20ad8b49911c396ffe90492981 to your computer and use it in GitHub Desktop.
number conversion
This file contains hidden or 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
fn main() { | |
let x = 1; // integer | |
let y = 1f32; // float32 | |
let z = x as f64 + y as f64; // float64 | |
println!("Hello, world: {}", z); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment