Language Easytrieve
| Date: | 04/20/05 |
| Author: | R. Heemskerk |
| URL: | n/a |
| Comments: | 0 |
| Info: | n/a |
| Score: |
* 99 bottles of beer
* Easytrieve programming language (Computer Associates)
* (c) R. Heemskerk, systeemprogrammeur@zonnet.nl
JOB INPUT(NULL) NAME BOTTLE-99
DEFINE BOTTLES W 2 N MASK 'Z9'
DEFINE BOTTLEWORD W 7 A
BOTTLES = 99
BOTTLEWORD = 'bottles'
DO WHILE BOTTLES > 0
DISPLAY BOTTLES ' ' BOTTLEWORD ' of beer on the wall, ' +
BOTTLES ' ' BOTTLEWORD ' of beer.'
DISPLAY 'Take one down, pass it around.'
BOTTLES = BOTTLES - 1
IF BOTTLES = 1
BOTTLEWORD = 'bottle'
END-IF
END-DO
DISPLAY 'No more bottles of beer on the wall, no more bottles of beer.'
DISPLAY 'Go to the store and buy some more.'
STOP
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