Skip to content

Instantly share code, notes, and snippets.

@vinipsmaker
Created April 24, 2016 01:19
Show Gist options
  • Save vinipsmaker/9c6ab3c39a0e2c65cc8f74dd32606886 to your computer and use it in GitHub Desktop.
Save vinipsmaker/9c6ab3c39a0e2c65cc8f74dd32606886 to your computer and use it in GitHub Desktop.
fn main() {
for i in 1..100 {
match (i % 3, i % 5) {
(0, 0) => println!("FizzBuzz"),
(0, _) => println!("Fizz"),
(_, 0) => println!("Buzz"),
_ => println!("{}", i)
}
}
}
@dirvine
Copy link

dirvine commented Apr 25, 2016

Nice :-) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment