99 Bottles of Beer/Basic: Difference between revisions
Content added Content deleted
m (→{{header|Sinclair ZX81 BASIC}}: -fix header) |
(99 Bottles of Beer/Basic en QBasic) |
||
Line 7: | Line 7: | ||
=={{header|BASIC}}== |
=={{header|BASIC}}== |
||
==={{header|QBasic}}=== |
|||
{{works with|QBasic|1.1}} |
|||
{{works with|QuickBasic|4.5}} |
|||
<lang QBasic>suffix$ = "s" |
|||
FOR bottles = 4 TO 1 STEP -1 |
|||
PRINT STR$(bottles) + " bottle" + suffix$ + " of beer on the wall, "; |
|||
PRINT STR$(bottles) + " bottle" + suffix$ + " of beer." |
|||
PRINT "Take one down and pass it around, "; |
|||
IF bottles > 1 THEN |
|||
IF bottles = 2 THEN suffix$ = "" |
|||
PRINT STR$(bottles - 1) + " bottle" + suffix$ + " of beer on the wall..." |
|||
ELSE |
|||
PRINT "no more bottles of beer on the wall..." |
|||
END IF |
|||
PRINT |
|||
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." |
|||
END</lang> |
|||
==={{header|QuickBASIC}}=== |
==={{header|QuickBASIC}}=== |
||
{{works with|QuickBASIC|4.5}} |
{{works with|QuickBASIC|4.5}} |