Created
July 11, 2011 23:52
-
-
Save masayukig/1077075 to your computer and use it in GitHub Desktop.
Fizz Buzz in Scala (3rd attempt..)
This file contains hidden or 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
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