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 Nemerle

Date:09/13/05
Author:caminoix
URL:http://p2p.info.pl
Comments:2
Info:http://nemerle.org
Score: (3.00 in 38 votes)
/*
"Nemerle is a high-level statically-typed programming language for the .NET platform. It offers
functional, object-oriented and imperative features. It has a simple C#-like syntax and a powerful
meta-programming system." - http://nemerle.org/Main_Page

TIP: If you like this code and would like to try Nemerle, take a look at
http://nemerle.org/Editors#Editors for text editors supporting Nemerle syntax highlighting.
*/

using System.Console;

class bottles{
   static bottles(count:int):void{
      mutable s="s"; when (count==2) s="";
      WriteLine($"$count bottles of beer on the wall, $count bottles of beer.");
      WriteLine($"Take one down and pass it around, $(count-1) bottle$s of beer on the wall.\n");
      when (count>2) bottles(count-1);
   }

   public static Main():void{
      bottles(99);
      WriteLine("1 bottle of beer on the wall, 1 bottle of beer.");
      WriteLine("Take one down and pass it around, no more bottles of beer on the wall.\n");
      WriteLine("No more bottles of beer on the wall, no more bottles of beer.");
      WriteLine("Go to the store and buy some more, 99 bottles of beer on the wall.");
   }
}

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
up-to-date versionVermicious Knid06/20/060
english numeralsVermicious Knid06/20/060
ext. methods and foreachVermicious Knid06/20/060

Comments

>>  GertrudeHESS25 said on 03/28/10 20:45:17

GertrudeHESS25 Every one remembers that modern life is high priced, but different people require cash for various stuff and not every one earns big sums money. So to get fast <a href="http://lowest-rate-loans.com">loans</a> or bank loan should be good way out.

>>  TwilaMurphy34 said on 03/28/10 20:46:09

TwilaMurphy34 I had got a dream to make my own firm, but I did not earn enough amount of money to do that. Thank God my close friend said to use the <a href="http://lowest-rate-loans.com/topics/home-loans">home loans</a>. Hence I received the student loan and realized my old dream.

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: