Language Turbo Pascal
(for Windows)
Date: | 04/20/05 |
Author: | Philipp Winterberg |
URL: | http://www.winterbergs.de/ |
Comments: | 2 |
Info: | n/a |
Score: | ![]() |
{ Turbo Pascal for Windows version of 99 Bottles of beer (Bottles.pas) } { Philipp Winterberg, http://www.winterbergs.de } program Bottles; uses wincrt; var b: byte; function plural(anz_flaschen: byte): string; begin if anz_flaschen <> 1 then plural:= 's' else plural:= '' end; {plural} begin screensize.y:= 1 + 99 * 5; inactivetitle:= ' 99 Bottles of beer '; initwincrt; for b:=99 downto 1 do begin writeln(b :2, ' bottle' + plural(b) + ' of beer on the wall, '); writeln(b :2, ' bottle' + plural(b) + ' of beer.'); writeln('Take one down, pass it around,'); writeln((b-1) :2, ' bottle' + plural(b-1) + ' of beer on the wall.'); writeln end end. {Bottles}
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
There is no window mode, so you can replace wincrt by crt, or delete it and delete :
screensize.y:= 1 + 99 * 5;
inactivetitle:= ' 99 Bottles of beer ';
initwincrt;
It runs only for TPW : Turbo Pascal for Windows