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 Mathematica

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:0
Info:n/a
Score: (2.56 in 9 votes)
<a href=http://mathserv.math.sfu.ca/Software/MmaIntro.html>Mathematica</a> is a computer algebra
system.

(* Mathematica version of 99 Bottles of Beer *)
(* Bill Dall *)
Do[If[i>1,
     Print[i, " more bottles of beer on the wall. ",i,
           " more bottles of beer."];
     Print["Take one down, pass it around."], 
     (* else *)
     Print["1 more bottle of beer on the wall. 1 more bottle of beer."]; 
     Print["Take one down, pass it around."];
     Print["No more bottles of beer on the wall."] 
     ], (* If *)
   {i,99,1,-1}]

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Very short version.Brenton Bostick03/16/061
Easily extensible, English-speakingSzabolcs Horvát03/04/080
3Konstantin Kouptsov02/27/060

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: