Classic 99 bottles of beer by RayZ

using C=System.Console;class c{static void Main(){string s=" of beer on the wall",b=" bottles",c=" bottle";for(int i=99;i>0;i--){C.Write(i+"{0}{2}, "+i+"{0} of beer.\nTake one down and pass it around, {3}{1}{2}.\n\n",(i==1)?c:b,(i-1==1)?c:b,s,(i-1==0)?"no more":(i-1).ToString());}C.Write("No more{0}{1}, no more{0} of beer.\nGo to the store and buy some more. 99{0}{1}.",b,s);}}

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


return to the top page