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 Sinclair QL SuperBasic

(Simple, loop based approach)

Date:07/15/11
Author:Anthony Prime
URL:n/a
Comments:0
Info:http://www.rwapadventures.com/ql_wiki/index.php?title=SuperBASIC
Score: (2.87 in 8 votes)
100 REMark Drinkers Delight
110 :
120 MODE 4
130 WINDOW 512,256,0,0
140 CLS
150 PRINT "All together now..."\
160 :
170 FOR beers=99 TO 1 STEP -1
180     IF beers>1
190         PRINT \beers;" Bottles of Beer on the wall ";
200         PRINT beers;" Bottles of Beer"
210         PRINT "Take one down, pass it around, ";
220         PRINT beers-1;" Bottles of Beer on the wall."\
230       ELSE 
240         PRINT \"1 Bottle of Beer on the wall, 1 Bottle of Beer"
250         PRINT "Take one down, pass it around, no more Bottles of Beer on the wall."\\
260         PRINT "No more Bottles of Beer on the Wall, no more Bottles of Beer"\
270         PRINT "Go to the store to buy some more, 99 Bottles of Beer on the wall"\\
280     END IF 
290 END FOR beers
300 :
310 PRINT "Hic..."
320 STOP

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: