#!/usr/bin/ruby -w def bottle(n) return n > 1 ? "#{n} bottles" : n > 0 ? "1 bottle" : "no more bottles" end (1..99).to_a.reverse.each{|i| print "#{bottle(i)} of beer on the wall, ", "#{bottle(i)} of beer.\n", "Take one down and pass it around, ", "#{bottle(i - 1)} of beer on the wall.\n\n" }