99 Bottles of Beer/Basic: Difference between revisions
Content added Content deleted
(→{{header|Minimal BASIC}}: Added) |
|||
Line 540: | Line 540: | ||
==={{header|FreeBASIC}}=== |
==={{header|FreeBASIC}}=== |
||
=== Normal version === |
|||
<lang freebasic>' FB 1.05.0 Win64 |
<lang freebasic>' FB 1.05.0 Win64 |
||
Line 560: | Line 561: | ||
Print "Press any key to sleep it off" |
Print "Press any key to sleep it off" |
||
Sleep</lang> |
|||
=== Code golf === |
|||
<lang freebasic>Var b=" bottle",s="s",f=" of beer",w=" on the wall",_ |
|||
t="Take one down and pass it around, ",n="o more",p="." |
|||
For a As Byte=99 To 1 Step-1 |
|||
?Str(a);b;*Iif(a>1,@s,0);f;w;",";a;b;*Iif(a>1,@s,0);f;p |
|||
If a>1 Then ?t;Str(a-1);b;*Iif(a>2,@s,0);f;w;p:? |
|||
Next |
|||
?t;"n";n;b;s;f;w;p:?:?"N";n;b;s;f;w;", n";n;b;s;f;p |
|||
?"Go to the store and buy some more, 99";b;s;f;w;p |
|||
Sleep</lang> |
Sleep</lang> |
||