Execute HQ9+: Difference between revisions

m
→‎{{header|NS-HUBASIC}}: The code is shorter while still being easily readable.
m (→‎{{header|NS-HUBASIC}}: The grammar of 99 Bottles of Beer has been improved.)
m (→‎{{header|NS-HUBASIC}}: The code is shorter while still being easily readable.)
Line 1,556:
=={{header|NS-HUBASIC}}==
<lang NS-HUBASIC>10 INPUT "INPUT HQ9+ CODE: ",I$
20 B$=" BOTTLES OF BEERS"
30 W$=" ON THE WALL"
40 FOR I=1 TO LEN(I$)
Line 1,565:
90 IF C$<>"9" GOTO 170
100 FOR B=99 TO 1 STEP -1
110 IF B=1 THEN B$=" BOTTLE OF BEER"
120 PRINT B " BOTTLE"B$" OF BEER" W$
130 PRINT B " BOTTLE"B$" OF BEER"
140 PRINT "TAKE ONE DOWN,"
150 PRINT "PASS IT AROUND"
160 IF B=2 THEN B$=" BOTTLE OF BEER"
170 IF B=1 THEN B$=" BOTTLES OF BEERS"
180 PRINT B-1 " BOTTLE"B$" OF BEER" W$
190 NEXT
200 NEXT</lang>
441

edits