Language D++
| Date: | 01/26/07 |
| Author: | Null1024 |
| URL: | n/a |
| Comments: | 1 |
| Info: | n/a |
| Score: |
'99 Bottles of Beer in D++
'App by Null1024
'Get D++ at www.pagemac.com
newvar beer;
function main()
{
for beer = 99 to 1 step -1;
if beer > 1 then
screenout beer & " bottles of beer on the wall,"; screen;
screenout beer & " bottles of beer,"; screen;
screenout "Take one down, pass it around,"; screen;
screenput beer & " bottles of beer on the wall,"; screen; screen;
endif
if beer = 1 then
screenout "1 bottle of beer on the wall,"; screen;
screenout "1 bottle of beer,"; screen;
screenout "Take one down, pass it around,"; screen;
screenput "1 bottle of beer on the wall,"; screen; screen;
endif;
next beer;
screenput "We need more beer."; screen;
pak;
end;
}
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments