Jump to content

99 bottles of beer: Difference between revisions

no edit summary
mNo edit summary
No edit summary
Line 1,775:
}</lang>
 
=={{header|EGL}}==
<lang EGL>program BottlesOfBeer
function main()
count int = 99;
beers string = bottleStr( count );
while ( count > 0 )
SysLib.writeStdout( beers :: " of beer on the wall." );
SysLib.writeStdout( beers :: " of beer." );
SysLib.writeStdout( "Take one down, pass it around." );
count -= 1;
beers = bottleStr( count );
SysLib.writeStdout( beers :: " of beer on the wall.\n" );
end
end
 
function bottleStr( count int ) returns( string )
case ( count )
when ( 1 )
return( "1 bottle" );
when ( 0 )
return( "No more bottles" );
otherwise
return( count :: " bottles" );
end
end
end</lang>
 
=={{header|Ela}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.