Last active
August 29, 2015 13:56
-
-
Save mathildathompson/9228842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 Bottles of Beer | |
Write a program which prints out the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall. | |
Requirements | |
Your file should be called beer.rb | |
The program should output to STDOUT using puts | |
To run the file: | |
ruby beer.rb | |
Here's a sampling of the lyrics... | |
99 bottles of beer on the wall, 99 bottles of beer. | |
Take one down and pass it around, 98 bottles of beer on the wall. | |
98 bottles of beer on the wall, 98 bottles of beer. | |
Take one down and pass it around, 97 bottles of beer on the wall. | |
97 bottles of beer on the wall, 97 bottles of beer. | |
Take one down and pass it around, 96 bottles of beer on the wall. | |
Then, at the end... | |
1 bottle of beer on the wall, 1 bottle of beer. | |
Take it down and pass it around, no more bottles of beer on the wall. | |
No more bottles of beer on the wall, no more bottles of beer. | |
Go to the store and buy some more, 99 bottles of beer on the wall. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment