Last active
August 29, 2015 14:13
-
-
Save hannahbasil/eb15e4d3683e69cdd553 to your computer and use it in GitHub Desktop.
99 bottles of beer
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
| while number.to_i >=1 | |
| puts "What's the first number in the 99 bottles of beer on the wall song?" | |
| number= gets.chomp | |
| puts number + " bottles of beer on the wall," + number +" bottles of beer." | |
| puts "Take one down and pass it around,"+((number.to_i)-1).to_s+ " bottles of beer on the wall." | |
| if number.to_i == 1 | |
| break | |
| puts "1 bottle of beer on the wall, 1 bottle of beer. | |
| Take one 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." | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment