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 COMAL

Date:09/08/06
Author:>>_I)@®klų®(I_<<
URL:n/a
Comments:0
Info:n/a
Score: (2.96 in 24 votes)
// 99 bottles of beer
// Damien montgomery
// september 2006
//
FOR count% := 99 TO 1 STEP -1 DO
    bottles (count%, TRUE)
    bottles (count%, FALSE)
    PRINT "Take one down, pass it around."
    bottles (count% - 1, FALSE)
NEXT count%
END
//
PROC bottles (number%, wall) CLOSED
    PRINT number%;
    text$ := " bottle"
    IF number% <> 1 THEN
        text$ := text$ + "s"
    ENDIF
    PRINT text$; " of beer";
    IF wall THEN
        PRINT " on the wall";
    ENDIF
    PRINT "."
ENDPROC bottles

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
original versionAnonymous04/20/050

Comments

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: