12 lines
155 B
Ruby
12 lines
155 B
Ruby
|
(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
|