Skip to content

Instantly share code, notes, and snippets.

@takoikatakotako
Last active January 15, 2017 12:06
Show Gist options
  • Select an option

  • Save takoikatakotako/f481418518f0625bdd5e2a7275da1888 to your computer and use it in GitHub Desktop.

Select an option

Save takoikatakotako/f481418518f0625bdd5e2a7275da1888 to your computer and use it in GitHub Desktop.
1から100までのFizzBizz問題
for num in 1..100 do
#puts(num)
if num%3 == 0 && num%5 == 0 then
puts('Fizz Buzz')
elsif num%3 == 0 then
puts('Fizz')
elsif num%5 == 0
puts('Buzz')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment