Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env scala -savecompiled
for (i <- 1 to 15) {
if (i % 15 == 0 ){
println("FizzBuzz")
} else if (i % 5 == 0) {
println("Buzz")
} else if (i % 3 == 0) {
println("Fizz")
} else {
println(i)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment