{ Turbo Pascal version of 99 Bottles of beer (Bottles.pas) } { Philipp Winterberg, http://www.winterbergs.de } program Bottles; var b: byte; function plural(anz_flaschen: byte): string; begin if anz_flaschen <> 1 then plural:= 's' else plural:= '' end; {plural} begin b:= 99; repeat writeln(b, ' bottle' + plural(b) + ' of beer on the wall, '); writeln(b, ' bottle' + plural(b) + ' of beer.'); writeln('Take one down, pass it around,'); writeln((b-1), ' bottle' + plural(b-1) + ' of beer on the wall.'); dec(b) until b = 0; readln; end. {Bottles}