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 Natural

Date:04/20/05
Author:Chris Bednara
URL:n/a
Comments:2
Info:n/a
Score: (2.15 in 20 votes)
* PGM-ID: BEER
* AUTHOR: CHRIS BEDNARA
* COMMENT: NATURAL '99 BOTTLES OF BEER ON THE WALL' CODE
*
*-------------------------------------------------------
DEFINE DATA
	LOCAL
	  01 #BOTTLES  (I2)
END-DEFINE
*
FOR #BOTTLES 99 TO 2 STEP -1
	IF #BOTTLES < 98
	  WRITE #BOTTLES ' BOTTLES OF BEER ON THE WALL'
	  WRITE ' '
	END-IF
*	
	WRITE #BOTTLES ' BOTTLES OF BEER ON THE WALL'
	WRITE #BOTTLES ' BOTTLES OF BEER'
	WRITE 'TAKE ONE DOWN, PASS IT AROUND'
END-FOR
*
WRITE '1 BOTTLE OF BEER ON THE WALL'
WRITE ' '
WRITE '1 BOTTLE OF BEER ON THE WALL'
WRITE '1 BOTTLE OF BEER'
WRITE 'TAKE IT DOWN, PASS IT AROUND'
WRITE 'NO MORE BOTTLES OF BEER ON THE WALL'
WRITE ' '
WRITE 'NO MORE BOTTLES OF BEER ON THE WALL'
WRITE 'NO MORE BOTTLES OF BEER'
WRITE 'GO TO THE STORE AND BUY SOME MORE'
WRITE '99 BOTTLES OF BEER'
END
WRITE 'TAKE ONE DOWN, PASS IT AROUND'

Download Source | Write Comment

Alternative Versions

Comments

>>  Anonymous said on 06/19/06 16:39:26

Anonymous This won't work, because there are no statements allowed after "END". You'll have to turn the last two rows around to get a working code.

>>  Bau de jogos said on 11/24/06 20:35:48

Bau de jogos what does a code that uses manual write buy us? :(

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: