Skip to content

Instantly share code, notes, and snippets.

@hpjaj
Created September 18, 2014 04:27
Show Gist options
  • Save hpjaj/2bc581e93c671011dbd8 to your computer and use it in GitHub Desktop.
Save hpjaj/2bc581e93c671011dbd8 to your computer and use it in GitHub Desktop.
week 3 - 8e
(1..100).each do |num|
if num % 3 == 0 && num % 5 == 0
puts "FizzBuzz"
elsif num % 3 == 0
puts "Fizz"
elsif num % 5 == 0
puts "Buzz"
else
puts num
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment