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|haXe}}==
=={{header|Haxe}}==
<lang haXe>class RosettaDemo
<lang haxe>class RosettaDemo
{
{
static public function main()
static public function main()
Line 2,496: Line 2,496:
while (bottles >= 1)
while (bottles >= 1)
{
{
neko.Lib.print(bottles + " bottle" + plural + " of beer on the wall,\n");
Sys.println(bottles + " bottle" + plural + " of beer on the wall,");
neko.Lib.print(bottles + " bottle" + plural + " of beer!\n");
Sys.println(bottles + " bottle" + plural + " of beer!");
neko.Lib.print("Take one down, pass it around,\n");
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)
{
{
neko.Lib.print(bottles-1 + " bottle" + plural + " of beer on the wall!\n\n");
Sys.println(bottles-1 + " bottle" + plural + " of beer on the wall!\n");
}
}
else
else
{
{
neko.Lib.print("No more bottles of beer on the wall!\n");
Sys.println("No more bottles of beer on the wall!");
}
}
bottles--;
bottles--;