99 bottles of beer: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 4,125: | Line 4,125: | ||
NinetynineBottles(when(Runtime.args.length > 0, int!Runtime.args[0], DEFAULT_BOTTLES_COUNT)).play() |
NinetynineBottles(when(Runtime.args.length > 0, int!Runtime.args[0], DEFAULT_BOTTLES_COUNT)).play() |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
The output for two bottle of beer is as follow. |
|||
{{out}} |
|||
<pre> |
|||
2 bottles of beer on the wall, 2 bottles of beer. |
|||
Take one down and pass it around, 1 bottle of beer on the wall. |
|||
1 bottle of beer on the wall, 1 bottle of beer. |
|||
Take one down and pass it around, No more bottles of beer on the wall. |
|||
No more bottles of beer on the wall, No more bottles of beer. |
|||
Go to the store and buy some more, 2 bottles of beer on the wall. |
|||
</pre> |
|||
=={{header|Erlang}}== |
=={{header|Erlang}}== |