This commit is contained in:
Rikuoh Tsujitani 2024-03-09 13:29:34 +09:00
parent aa92ee1d42
commit 0d8e96bd3a
Signed by: riq0h
GPG key ID: 010F09DEA298C717

11
fizzbuzz.rb Executable file
View file

@ -0,0 +1,11 @@
(1..20).each do |x|
if x % 15 == 0
puts 'FizzBuzz'
elsif x % 3 == 0
puts 'Fizz'
elsif x % 5 == 0
puts 'Buzz'
else
puts x
end
end