Over a million developers have joined DZone.

99 Bottles Of Beer

·
def bottle(x)
  case x
  when 0 then "no more bottles"
  when 1 then "1 bottle"
  else        "#{x} bottles"
  end + " of beer"
end

99.downto(1) do |i|
  puts <
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}