Language COMAL
| Date: | 09/08/06 |
| Author: | >>_I)@®klų®(I_<< |
| URL: | n/a |
| Comments: | 0 |
| Info: | n/a |
| Score: |
// 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
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