Language DarkBasic Professional
(The Darkbasic Professional version)
| Date: | 09/20/05 |
| Author: | Nicholas Kingsley |
| URL: | http://www.nicholaskingsley.co.uk |
| Comments: | 3 |
| Info: | http://www.darkbasicpro.com |
| Score: |
global t$ as string
for bottles=99 to 1 step -1
t$=isPlural(bottles)
t$=t$+" of beer on the wall"
print t$;", ";t$
print "Take one down and pass it around, ";
if bottles-1>0
print isPlural(bottles-1);
print " of beer on the wall"
else
print "No more bottles of beer on the wall"
endif
sync
next bottles
print "No more bottles of beer on the wall, no more bottles of beer."
print "Go to the store and buy some more, 99 bottles of beer on the wall..."
wait key
function isPlural(bottles as integer)
local temp$ as string
temp$=str$(bottles)+" bottle"
if bottles>1
temp$=temp$+"s"
endif
endfunction temp$
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