Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language DBase III

Date:04/20/05
Author:Brian Hobbs
URL:n/a
Comments:0
Info:n/a
Score: (2.92 in 12 votes)
&& BEER.PRG  - 99 Bottles of Beer  - Brian Hobbs  Jan 1996
&& (BHOBBS@cayman.vf.mmc.com)
SET TALK OFF
I=99
DO WHILE I>=1
   b = STR(i,2)
   ? b +" Bottle"
   IF i > 1
      ?? "s"
   ENDIF
   ?? " of beer on the wall "+b+" bottle"
   IF i> 1 
     ?? "s"
     ENDIF
   ?? " of beer"
   ? "   Take one down and pass it around"
   i=i-1
   b = STR(i,2)
   if i = 0
     b = "No more"
     ENDIF
   ? b + " Bottle"
   IF I > 1 .OR. I=0
      ?? "s"
   ENDIF
   ?? " of beer on the wall"
   ?
ENDDO
   ? "No more bottles of beer on the wall, No more bottles of beer"
   ? "Go to the store and buy some more - 99 bottles of beer on the wall"
SET TALK ON

Download Source | Write Comment

Alternative Versions

Comments

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!

Name:

eMail:

URL:

Security Code:
  
Comment: