June 18, 2002
99 Bottles of Beer

What a funny idea: take a simple program and write it in 304 different programming languages. On 99 Bottles of Beer you find solutions from "A+" until "ZZT". But you won't believe it - there is no Actionscript version yet.

Posted at June 18, 2002 12:38 PM | Further reading
Comments

onClipEvent(load) {
for (i = 99 ; i > 0 ; i--) {
j = i - 1;
if (i != 1) {
icase = "bottles";
} else {
icase = "bottle";
}
if (j != 1) {
jcase = "bottles";
} else {
jcase = "bottle";
}
trace(i + " " + icase + " of beer on the wall,");
trace(i + " " + icase + " of beer,");
trace("Take 1 down, pass it around,");
if (j != 0) {
trace(j + " " + jcase + " of beer on the wall.");
trace("");
} else {
trace("No more bottles of beer on the wall!");
trace("");
}
}
}

Pretty simple really. :)

Posted by: scuttlefly on June 19, 2002 12:07 AM

You didnt get that from the Javascript listing made in 1996 by any chance?

Interpretive Java.

/**
* 99 Bottles of Beer on the Wall in JavaScript
* This program prints out the lyrics of an old pub song.
* Copyright (C) 1996, Brian Patrick Lee (blee@media-lab.mit.edu)
*/
if (confirm("Are you old enough to read about beer\n" +
"according to your local community standards?")) {
for (i = 99 ; i > 0 ; i--) {
j = i - 1;
if (i != 1) {
icase = "bottles";
} else {
icase = "bottle";
}
if (j != 1) {
jcase = "bottles";
} else {
jcase = "bottle";
}
document.writeln(i + " " + icase + " of beer on the wall,");
document.writeln(i + " " + icase + " of beer,");
document.writeln("Take 1 down, pass it around,");
if (j != 0) {
document.writeln(j + " " + jcase + " of beer on the wall.");
} else {
document.writeln("No more bottles of beer on the wall!");
}
document.writeln()
}
} else {
document.write("You might want think about moving to another community.")
}

*lol*

Posted by: Guy Watson on July 6, 2002 06:04 AM

exactly!

see. "pretty simple really" !

Posted by: scuttlefly on July 17, 2002 04:26 PM

smart conclusion
you might have practiced a lot drinking beer:))
after 100 beers you invent the most beautiful beer mugs like on http://www.crystalgiftsworld.com/beer-mugs.html

Posted by: Beer on March 18, 2004 10:06 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?



Thank you!

Most Visited Entries
Sketches, Works & Source Code
Lectures
Contact
Backlog
In Love with
Powered by
Movable Type 2.661

© Copyright Mario Klingemann

Syndicate this site:
RSS 1.0 - RSS 2.0

Quasimondo @ flickr
Quasimondo @ LinkedIn
Quasimondo @ Twitter
Quasimondo @ Facebook
Quasimondo @ MySpace
Quasimondo is a Bright
Citizen of the TRansnational Republic
My other blog in german
Impressum


My family name is written Klingemann,
not Klingelmann, Klingeman, Klingaman, Kingemann,
Kindermann, Killingaman, Klingman, Klingmann, Klingonman
Klingemman, Cleangerman, Klingerman or Kleangerman

profile for Quasimondo at Stack Overflow, Q&A for professional and enthusiast programmers