Skip to content

Instantly share code, notes, and snippets.

@megabites2013
Created March 23, 2021 11:49
Show Gist options
  • Save megabites2013/500b35aa18733dc0b6199838ce6d7d61 to your computer and use it in GitHub Desktop.
Save megabites2013/500b35aa18733dc0b6199838ce6d7d61 to your computer and use it in GitHub Desktop.
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