$bottleCount = 99
def Sing()
if $bottleCount > 0
if $bottleCount == 1
print $bottleCount, " bottle of beer on the wall, ", $bottleCount, " bottle of beer.\n"
print "You take one down, pass it around, no more bottles of beer on the wall.\n\n"
$bottleCount -= 1
Sing()
else
print $bottleCount, " bottles of beer on the wall, ", $bottleCount, " bottles of beer.\n"
print "You take one down, pass it around, ", $bottleCount - 1, " bottles of beer on the wall.\n\n"
$bottleCount -= 1
Sing()
end
else
print "No more bottles of beer on the wall, no more bottles of beer.\n"
print "Go to the store and buy some more, 99 bottles of beer on the wall.\n"
end
end
Sing()
Put this script into a text file called 99.rb. From the command line run this "ruby 99.rb | say
Recent comments
24 weeks 6 days ago
30 weeks 5 days ago
2 years 1 week ago
2 years 4 weeks ago