Skip to content

Instantly share code, notes, and snippets.

@courtneyfaulkner
Created September 6, 2017 04:28
Show Gist options
  • Save courtneyfaulkner/178da46673562b16eb5222b0d7250dca to your computer and use it in GitHub Desktop.
Save courtneyfaulkner/178da46673562b16eb5222b0d7250dca to your computer and use it in GitHub Desktop.
[FizzBuzz] #practice
class FizzBuzz {
static void main(String[] args) {
(1..100).each {println((it % 3 ? '' : 'fizz') + (it % 5 ? '' : 'buzz') ?: it)}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment