Skip to content

Instantly share code, notes, and snippets.

@tilpner
Created February 9, 2015 13:06
Show Gist options
  • Save tilpner/4ada5fd0751b0e98f382 to your computer and use it in GitHub Desktop.
Save tilpner/4ada5fd0751b0e98f382 to your computer and use it in GitHub Desktop.
fn main() {
for i in 1..101 {
match (i % 3, i % 5) {
(0, 0) => println!("Fizzbuzz"),
(0, _) => println!("Fizz"),
(_, 0) => println!("Buzz"),
_ => println!("{}", i),
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment