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 MuPad

Date:06/03/05
Author:Thorsten Schaefer
URL:n/a
Comments:0
Info:http://www.mupad.de/
Score: (3.00 in 1 votes)
// 99 Bottles of Beer in Mupad
// by Thorsten Schaefer (schaefer-thorsten[at]gmx[dot]de)
// Paderborn, Germany
for beers from 99 downto 0 do
  if beers = 1 then
    s := "":
  else
    s := "s":
  end_if:
 
  print(NoNL, expr2text(beers)." bottle".s." of beer on the wall, "):
  print(NoNL, expr2text(beers)." bottle".s." of beer, \n"):

  if beers = 0 then
    print(NoNL, "Go to the store, buy some more, "):
    print(NoNL, "99 bottles of beer on the wall.\n"):
  else
    print(NoNL, "Take one down, pass it around, "):
    print(NoNL, expr2text(beers)." bottle".s." of beer on the wall.\n\n"):
  end_if:  
end_for:

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: