Voting

Category

esoteric language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language coNCePTuaL

Date:03/18/09
Author:Scott Pakin
URL:http://www.ccs3.lanl.gov/~pakin/
Comments:0
Info:http://conceptual.sourceforge.net/
Score: (3.33 in 3 votes)
For each numbottles in {99, ..., 1} {
  if numbottles = 1 then
    task 0 outputs "1 bottle of beer on the wall, "
      and "1 bottle of beer."
  otherwise
    task 0 outputs numbottles and " bottles of beer on the wall, "
      and numbottles and  " bottles of beer." then
  if numbottles-1 = 0 then
    task 0 outputs "Take it down and pass it around, "
      and "no more bottles of beer on the wall.\n"
  otherwise
    if numbottles-1 = 1 then
      task 0 outputs "Take one down and pass it around, "
        and "1 bottle of beer on the wall.\n"
    otherwise
      task 0 outputs "Take one down and pass it around, "
        and (numbottles-1) and " bottles of beer on the wall.\n"
} then
task 0 outputs "No more bottles of beer on the wall, no more bottles of beer." then
task 0 outputs "Go to the store and buy some more, 99 bottles of beer on the wall.".

Download Source | Write Comment

Alternative Versions

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: