Skip to content

Instantly share code, notes, and snippets.

@masayukig
Created July 11, 2011 23:52
Show Gist options
  • Save masayukig/1077075 to your computer and use it in GitHub Desktop.
Save masayukig/1077075 to your computer and use it in GitHub Desktop.
Fizz Buzz in Scala (3rd attempt..)
for(i<-1 to 100){println((i%3,i%5)match{case(0,0)=>"FizzBuzz"case(0,_)=>"Fizz"case(_,0)=>"Buzz"case _=>i})}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment