Language Maxima
Date: | 09/23/08 |
Author: | Wilhelm Haager |
URL: | n/a |
Comments: | 0 |
Info: | http://maxima.sourceforge.net/ |
Score: | (3.00 in 28 votes) |
b(n,c) := block([l:["n","N"]], if n>1 then concat(n," bottles") else if n<1 then concat(l[c],"o more bottles") else "1 bottle")$ map( lambda([u], disp(concat(b(u,2)," of beer on the wall, ",b(u,1)," of beer.")), if u>0 then disp(concat("Take one down and pass it around, ", b(u-1,1)," of beer on the wall.")) else disp("Go to the store and buy some more, 99 bottles of beer on the wall.") ), makelist(100-k,k,1,100) )$
Download Source | Write Comment
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