Created
June 5, 2012 00:52
-
-
Save jbrechtel/2871753 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| numb = 10 | |
| while numb != 0 | |
| bottle = "bottle" | |
| if numb > 1 | |
| bottle = "bottles" | |
| end | |
| puts numb.to_s + ' ' + bottle + ' of beer on the wall ' + numb.to_s + ' ' + bottle +' of beer' | |
| numb = (numb - 1) | |
| if numb == 0 | |
| puts 'take it down, pass it around no bottles of beer on the wall' | |
| else | |
| puts 'take one down, pass it around ' + numb.to_s + ' bottles of beer on the wall' | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment