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 Snobol

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:2
Info:n/a
Score: (2.90 in 10 votes)
* 99 BOTTLES OF BEER IN SNOBOL (UNTESTED)
         BEER = 99
MOREBEER OUTPUT = BEER ' BOTTLES OF BEER ON THE WALL'
         OUTPUT = BEER ' BOTTLES OF BEER'
         OUTPUT = 'TAKE ONE DOWN, PASS IT AROUND'
         BEER = BEER - 1
         OUTPUT = BEER ' BOTTLES OF BEER ON THE WALL'
         GT(BEER,0)   : S(MOREBEER)
         OUTPUT = 'NO MORE BOTTLES OF BEER ON THE WALL'
         OUTPUT = 'NO MORE BOTTLES OF BEER'
         OUTPUT = 'GO TO THE STORE AND BUY SOME MORE'
         OUTPUT = '99 BOTTLES OF BEER'
END

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Produces the correct outputSteve Byers04/16/090

Comments

>>  Harald Arnesen said on 01/31/06 01:30:21

Harald Arnesen "1 bottles"?

>>  MAH said on 06/28/06 20:04:36

MAH Oh good. An interative solution in a language famed for recursion.

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: