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 Nova

Date:06/28/06
Author:Sachin Kainth
URL:n/a
Comments:0
Info:http://www.navgen.com/nova/
Score: (2.80 in 10 votes)
// 99 Bottles of beer

class App
{
	static void main( String[] args )
	{
		for (int i = 99; i >= 0; i--) 
		{
		 	if (i == 0) 
			{
				Stream.writeLine("No more bottles of beer on the wall, " + 
					"no more bottles of beer.");	
				Stream.writeLine("Go to the shop and buy some more, " +
					"99 bottles of beer on the wall.");
		
			}
			else if (i == 1)
			{
				Stream.writeLine("1 bottle of beer on the wall, " +
					"1 bottle of beer.");	
				Stream.writeLine("Take one down and pass it around, " +
					"no more bottles of beer on the wall.");
			}
			else if (i == 2)
			{
				Stream.writeLine("2 bottles of beer on the wall, " +
					"2 bottles of beer.");	
				Stream.writeLine("Take one down and pass it around, " +
					"1 bottle of beer on the wall.");
			}
			else 
			{
				Stream.writeLine(
					Integer.toString(i) + 
					" bottles of beer on the wall, " + 
					Integer.toString(i) + " bottles of beer.");
				Stream.writeLine(
					"Take one down and pass it around, " + 
					Integer.toString(i-1) + 
					" bottles of beer on the wall.");
			}
			Stream.writeLine("");
		}
	}
}

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: