Skip to content

Instantly share code, notes, and snippets.

@ajnadel
Created February 12, 2015 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajnadel/071499c51407c16d026e to your computer and use it in GitHub Desktop.
Save ajnadel/071499c51407c16d026e to your computer and use it in GitHub Desktop.
object FizzBuzz {
def main(args: Array[String]){
for( i <- 1 to 100){
if (i%15 == 0)
println("FizzBuzz")
else if (i%3 == 0)
println("Fizz")
else if (i%5 == 0)
println("Buzz")
else
println(i)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment