Created
March 23, 2021 11:49
-
-
Save megabites2013/500b35aa18733dc0b6199838ce6d7d61 to your computer and use it in GitHub Desktop.
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
fn main(){ | |
println!("Hello from print.rs"); | |
println!( | |
"{0} is from {1} and {0} likes to {2}", | |
"Nicholas", | |
"Stockholm", | |
"code" | |
); | |
println!( | |
"{name} likes to play {game}", | |
name = "Nicholas", | |
game = "Monopoly" | |
); | |
println!( | |
"Binary: {:b} Hex: {:x} Octal: {:o}", | |
10, | |
10, | |
10 | |
); | |
// Tuples in Rust | |
println!("{:?}",(10,true,"String") ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment