- or download this
10 REM BASIC Version of 99 Bottles of beer
20 FOR X=100 TO 1 STEP -1
...
40 PRINT "Take one down and pass it around,"
50 PRINT X-1;"bottle(s) of beer on the wall"
60 NEXT
- or download this
use Lingua::EN::Inflect 'inflect';
$n=shift||99;
...
Take one down, pass it around,
NO(bottle of beer,@{[--$n]}) on the wall.
BURP
- or download this
sub
b{[@b=(abs||No,bottle."s"x!!++$_,of,beer),on,the,wall]}print
"@{+b},\n@b,\nTake one down, pass it around,\n@{+b}.\n"
for-pop||-99..-1
- or download this
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.
...
1 bottle of beer on the wall, 1 bottle of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.
- or download this
sub b{[@b=(abs||99,bottle."s"x!!++$_,of,beer),on,the,wall]}print"@{+b}
+, @b.
",$_?"Take one down and pass it around":"Go to the store and buy some
+more",", @{+b}.
"for-99..-1
- or download this
sub b{@b=(-$_++||99,bottl.($_?es:e),of,beer);"@b on the wall"}print+b,
+", @b.
",$_?"Take one down and pass it around, ":"Go to the store and buy som
+e more, ",b,".
"for-99..-1
- or download this
@{sub b{[@b=(abs||No,bottle.'s'x!!++$_,of,beer),on,the,wall]}b}
- or download this
print"@{sub b{[@y=($n||=99,bottle.'s'x1!~$n,of,beer),on,the,wall]}b},
+@y.
$_, @{b--$n}.
"for("Take one down and pass it around")x98,"Go to the store and buy s
+ome more"
- or download this
n=99
z=lambda:`n or 99`+" bottle"+"s of beer on the wall"[n==1:]
while n:y=z();n-=1;print"%s, %s.\n"*2%(y,y[:-12],n and"Take one down a
+nd pass it around"or"Go to the store and buy some more",z())
- or download this
def z
"#{N<1?99:N} bottle#{'s'if N!=1} of beer"end
(N=99).times{puts"%s, %s.
"*2%[z+w=" on the wall",z,1>(N-=1)?"Go to the store and buy some more"
+:"Take one down and pass it around",z+w],""}
- or download this
z+w=" on the wall"
- or download this
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.
...
1 bottle of beer on the wall, 1 bottle of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.
- or download this
99 bottles of beer on the wall, 99 bottles of beer.
-----------------------------------------------------------------
...
1 bottle of beer on the wall, 1 bottle of beer.
-----------------------------------------------------------------
Go to the store and buy some more, 99 bottles of beer on the wall.
- or download this
Go to the store and buy some more, 99 bottles of beer on the wall.
...
Take one down and pass it around, 1 bottle of beer on the wall.
1 bottle of beer on the wall, 1 bottle of beer.
- or download this
join("Take one down and pass it around",map{@c=(@b=(99-$_,bottle.'s'x!
+/98/,of,beer),on,the,wall);", @c.
...
"}0..98)=~/
/;print$'."Go to the store and buy some more$`"
- or download this
somearray.join("string")
- or download this
somearray*"string"
- or download this
"Go to the store and buy some more"+(-99..-1).map{|n|", #{c="#{b=-n,"
+bottle"+"s of beer"[1/-n,9]} on the wall"}.
...
"}*"Take one down and pass it around"=~/
/;puts$'+$`
- or download this
"Go to the store and buy some more"+(-99..-1).map{|n|", #{b=-n," bottl
+es"[0,6-n]+" of beer"," on the wall"}.
...
"%b}*"Take one down and pass it around"=~/
/;puts$'+$`
- or download this
r="Take one down and pass it around".join(", %s.\n\n"%c+c+", %s.\n"%c[
+:-12]for c in[`99-z`+" bottle"+"s of beer on the wall"[z/98:]for z in
+ range(99)])
print r[35:]+"Go to the store and buy some more"+r[:34]
- or download this
n=99
y="Go to the store and buy some more"
while n:c=`n`+" bottle"+"s of beer on the wall"[1/n:];y+=", %s.\n\n"%c
++c+", %s.\nTake one down and pass it around"%c[:-12];n-=1
print y[68:-32]+y[:66]
- or download this
c=198
while c:y=`c/2or 99`+" bottle"+"s of beer on the wall"[3/c%3:];print[y
+,"Take one down and pass it around","Go to the store and buy some mor
+e"][1/c+c%2]+",",[y[:-12]+".",y+".\n"][c%2];c-=1
- or download this
n=198
loop{$><<[y=[n/2%-99+99," bottle"+"s of beer"[3/n%3,9]," on the wall"]
+,"Take one down and pass it around","Go to the store and buy some mor
+e"][j=1/n+1&~n-=1]<<", #{y[0,2+j]}.
"+$/*j}
- or download this
bottle."s"x!!++$_,of,beer # Perl
bottl.($_?es:e),of,beer # Perl
...
" bottles"[0,6-n]+" of beer" # Ruby
"bottle"+"s of beer"[3/n%3,9] # Ruby
"bottle"+"s of beer"[1/n:] # Python
- or download this
"bottle$x of beer"
- or download this
@c=(@b=(++$n,bottle.$&,of,beer),on,the,wall),s/^/Take one down and pas
+s it around, @c.
...
/,/s/for($_)x99;/,.*
/;print$'."Go to the store and buy some more$&"
- or download this
s/./$& $&/gfor($_="-
")x pop;print
- or download this
/s/until@c=(@b=(++$n,bottle.$&,of,beer),on,the,wall),s/^/Take one down
+ and pass it around, @c.
...
/,/, 99.*
/;print$'."Go to the store and buy some more$&"
- or download this
/s/until@c=($b=++$n." bottle$& of beer",on,the,wall),s/^/Take one down
+ and pass it around, @c.
...
/,/, 99.*
/;print$'."Go to the store and buy some more$&"
- or download this
/s/until@c=(++$n." bottle$& of beer",on,the,wall),s/^/Take one down an
+d pass it around, @c.
...
/,/99.*
/;print$'."Go to the store and buy some more, $&"
- or download this
1.upto(99){|n|~/s/;$_="Take one down and pass it around, #{c="#{b=n,"
+bottle#$& of beer"} on the wall"}.
...
~/,.*
/;puts$'+"Go to the store and buy some more"+$&
- or download this
n=0
~/s/ until/, 99.*
...
#{c}, #{b}.
#$_";puts$'+"Go to the store and buy some more"+$&
- or download this
b=[99," bottles of beer"," on the wall"]
print "%s%s\n"%b
- or download this
99 bottles of beer
- or download this
TypeError: not enough arguments for format string
- or download this
@b=(99," bottles of beer"," on the wall");
printf "%s%s\n",@b;
- or download this
b=[99," bottles of beer"," on the wall"]
print "%s%s\n"%tuple(b)
- or download this
TypeError: not all arguments converted during string formatting
- or download this
b=[99," bottles of beer"," on the wall"]
print "%s%s%s\n"%tuple(b)
- or download this
99 bottles of beer on the wall
- or download this
1.upto(99){|n|~/s/;$_="Take one down and pass it around, #{c=n," bottl
+e#$& of beer"," on the wall"}.
...
~/,.*
/;puts$'+"Go to the store and buy some more"+$&
- or download this
1st 162 rhebus Perl
2nd 162 eyepopslikeamosquito Perl
...
8th 171 flagitious Perl
9th 171 o0lit3 Perl
10th 171 gorash Perl
- or download this
1st 162 rhebus
2nd 162 eyepopslikeamosquito
...
65th 195 Jasper
89th 204 chargrill
98th 209 yanick
- or download this
1st 173 flagitious
2nd 176 eyepopslikeamosquito
...
18th 186 carldr
19th 186 pace_t_zulu
20th 187 adel
- or download this
1st 182 hallvabo
2nd 183 logan
...
18th 199 max
19th 200 Dilb
20th 200 yonilevy
- or download this
1st 172 ToastyX
2nd 173 eyepopslikeamosquito
...
18th 200 phoe
19th 201 underdonges
20th 203 Theory