Language Mathematica
| Date: | 04/20/05 |
| Author: | Anonymous |
| URL: | n/a |
| Comments: | 0 |
| Info: | n/a |
| Score: |
<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
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| Very short version. | Brenton Bostick | 03/16/06 | 0 | |
| 2 | Konstantin Kouptsov | 02/27/06 | 0 | |
| Easily extensible, English-speaking | Szabolcs Horvát | 03/04/08 | 0 |
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!
Comments