Jump to content

99 bottles of beer: Difference between revisions

Add Ecstasy example
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
(Add Ecstasy example)
Line 3,725:
OUTPUT(SORT(Rev,-Recid1,-RecID2),{txt},ALL);
</syntaxhighlight>
 
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">module Bottles
{
@Inject Console console;
void run()
{
function String(Int) num = i -> i==0 ? "No" : i.toString();
function String(Int) bottles = i -> i==1 ? "bottle" : "bottles";
 
for (Int remain : 99..1)
{
console.println($|{num(remain)} {bottles(remain)} of beer on the wall
|{num(remain)} {bottles(remain)} of beer
|Take one down, pass it around
|{num(remain-1)} {bottles(remain-1)} of beer on the wall
|
);
}
}
}</syntaxhighlight>
 
=={{header|Egel}}==
162

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.