Skip to content

Instantly share code, notes, and snippets.

@tk3369
Created February 1, 2015 23:04
Show Gist options
  • Save tk3369/8985fa73179a08e7f1c6 to your computer and use it in GitHub Desktop.
Save tk3369/8985fa73179a08e7f1c6 to your computer and use it in GitHub Desktop.
FizzBuzz in Swift without if-statement
for i in 1...100 {
println([["FizzBuzz","Fizz"],["Buzz","\(i)"]][min(1,i%3)][min(1,i%5)])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment