Language Delphi
(standard version)
| Date: | 04/20/05 |
| Author: | Anonymous |
| URL: | n/a |
| Comments: | 4 |
| Info: | n/a |
| Score: |
program BeerSong;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
b :integer;
begin
WriteLn( Format('%d bottles of beer on the wall', [99]));
WriteLn( Format('%d bottles of beer', [99]));
WriteLn( 'You take one down and pass it around');
for b := 98 downto 2 do
begin
WriteLn( Format('%d bottles of beer on the wall.', [b]));
WriteLn('');
WriteLn( Format('%d bottles of beer on the wall', [b]));
WriteLn( Format('%d bottles of beer', [b]));
WriteLn( 'You take one down and pass it around');
end;
b := 1;
WriteLn( Format('%d bottle of beer on the wall', [b]));
WriteLn('');
WriteLn( Format('%d bottle of beer', [b]));
WriteLn( 'You take one down and pass it around');
WriteLn( 'No bottles of beer on the wall!');
end.
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| OO version - Delphi 7 | Luis Carlos F. Dias | 09/10/05 | 9 | |
| Recursive version | Juan Carlos Molinos | 01/12/06 | 2 | |
| OO Simple version (not using Interfaces) | Luis Carlos F. Dias | 09/04/05 | 0 | |
| NonVCL version | Philipp Winterberg | 04/20/05 | 0 | |
| OO version (with interface) | Luis Carlos F. Dias | 09/05/05 | 0 |
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