fjord/fizzbuzz.rb
2024-03-09 13:29:34 +09:00

11 lines
155 B
Ruby
Executable file

(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