Classic 99 bottles of beer by smkt

for(0..98){\x0d
printf("%d bottle%s of beer on the wall, %d bottle%s of beer.\nTake one down and pass it around, ",$x=99-$_,$z=$x==1?"":"s",$x,$z);\x0d
if($z){printf("%d bottle%s of beer on the wall.\n\n",$x-1,$x==2?"":"s");} else {print("no more bottles of beer on the wall.\n\n");}\x0d
}\x0d
print("No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more. 99 bottles of beer on the wall.");

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page