Language HotBasic
(Different,using a Do-Loop & Select/Case)
| Date: | 10/02/05 |
| Author: | AirrSongs |
| URL: | http://www.airsys.com |
| Comments: | 1 |
| Info: | http://www.hotbaic.org |
| Score: |
$apptype console:$typecheck on
defstr BeerOnWall = " of Beer on the wall"
defstr TakeOne = "Take one down, pass it around,"
defbyte count = 99
do
select case count
case > 1
print count;space;"bottles";BeerOnWall;","
print count;space;"bottles";Left$(BeerOnWall,8);",";crlf;TakeOne
if not (count-1) = 1 then
print count-1;space;"bottles";BeerOnWall;crlf
else
print count-1;space;"bottle";BeerOnWall;crlf
end if
dec(count)
case else
print count;space;"bottle";BeerOnWall;","
print count;space;"bottle";Left$(BeerOnWall,8);",";crlf;TakeOne
print count-1;space;"bottles";BeerOnWall;"!";crlf;crlf
dec(count)
end select
loop until count = zero
pause
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
http://www.airsys.org
http://www.hotbasic.org