Skip to content

Instantly share code, notes, and snippets.

@tkbeili
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save tkbeili/a9d6f514980b6b89e39a to your computer and use it in GitHub Desktop.

Select an option

Save tkbeili/a9d6f514980b6b89e39a to your computer and use it in GitHub Desktop.
FizzBuzz Solution
for number in 1..100
if number % 3 == 0 && number % 5 == 0
puts "FIZZBUZZ"
elsif number % 3 == 0
puts "FIZZ"
elsif number % 5 == 0
puts "BUZZ"
else
puts number
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment