Created
January 20, 2017 09:32
-
-
Save Leammas/434a6b3098058a57c04693295a388d06 to your computer and use it in GitHub Desktop.
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
for { | |
num <- 1 to 100 | |
} yield { | |
if (num % 3 == 0) print("Fizz") | |
if (num % 5 == 0) print("Buzz") | |
if (num % 3 != 0 && num % 5 != 0) print(num) | |
print("\n") | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment