99 bottles of beer: Difference between revisions
Content added Content deleted
Line 2,482: | Line 2,482: | ||
main = putStr songString</lang> |
main = putStr songString</lang> |
||
=={{header| |
=={{header|Haxe}}== |
||
<lang |
<lang haxe>class RosettaDemo |
||
{ |
{ |
||
static public function main() |
static public function main() |
||
Line 2,496: | Line 2,496: | ||
while (bottles >= 1) |
while (bottles >= 1) |
||
{ |
{ |
||
Sys.println(bottles + " bottle" + plural + " of beer on the wall,"); |
|||
Sys.println(bottles + " bottle" + plural + " of beer!"); |
|||
Sys.println("Take one down, pass it around,"); |
|||
if (bottles - 1 == 1) |
if (bottles - 1 == 1) |
||
{ |
{ |
||
Line 2,506: | Line 2,506: | ||
if (bottles > 1) |
if (bottles > 1) |
||
{ |
{ |
||
Sys.println(bottles-1 + " bottle" + plural + " of beer on the wall!\n"); |
|||
} |
} |
||
else |
else |
||
{ |
{ |
||
Sys.println("No more bottles of beer on the wall!"); |
|||
} |
} |
||
bottles--; |
bottles--; |