Last active
August 29, 2015 13:57
-
-
Save keizo042/9382698 to your computer and use it in GitHub Desktop.
FizzBuzzをscalaで書いた。分かりやすく書けて割りと気に入っている。そういうお題じゃないとも思う。
This file contains 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
(1 to 100).foreach{ i => | |
printf("%d",i) | |
if(i % 3 == 0) printf("Fizz") | |
if(i % 5 == 0) printf("Buzz") | |
printf(" ")} | |
println |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment