Created
March 29, 2016 17:54
-
-
Save gr33n7007h/a3752f53556d6a41fc9ea93a529f07bf to your computer and use it in GitHub Desktop.
99bob
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
#!/usr/bin/env ruby | |
v = %|%d bottle%s of beer on the wall, %d bottle%s of beer\ntake one down, pass it around, %d bottle%s of beer on the wall.\n\n| | |
s = -> (i) { i != 1 ? ?s : '' } | |
99.step(1, -1).each { |i| puts v % [i, s[i], i, s[i], i-1, s[i-1]] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment