Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Delphi

(standard version)

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:4
Info:n/a
Score: (2.85 in 20 votes)
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

VersionAuthorDateCommentsRate
OO version - Delphi 7Luis Carlos F. Dias09/10/059
Recursive versionJuan Carlos Molinos01/12/062
OO Simple version (not using Interfaces)Luis Carlos F. Dias09/04/050
NonVCL versionPhilipp Winterberg04/20/050
OO version (with interface)Luis Carlos F. Dias09/05/050

Comments

>>  antonio said on 05/17/05 15:56:29

antonio dirty style programming. bueee

>>  calyptus said on 05/22/05 01:36:42

calyptus there is missig a . after the last end!

>>  Stefan said on 05/22/05 14:10:41

Stefan Fixed. Thanks.

>>  Beer Words of Wisdom said on 12/06/06 09:20:52

Beer Words of Wisdom thats what i call artificial inteligence!!! haha

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!

Name:

eMail:

URL:

Security Code:
  
Comment: