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 NASL - Nessus Attack Scripting Language

Date:05/12/05
Author:Paul Dale
URL:n/a
Comments:0
Info:http://www.nessus.org/
Score: (2.91 in 117 votes)
function bottles(n)
{
  if (n == 0)
    return "no bottles";
  if (n == 1)
    return "1 bottle";
  return i + " bottles";
}

for (i=100; i> 0; ) {
  display(bottles(n: i),' of beer on the wall, ', bottles(n: i),' of beer.\n');
  display('Take one down and pass it around,\n');
  display(bottles(n: --i), ' of beer on the wall.\n\n');
}

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: