99 Bottles of Beer/Basic: Difference between revisions
Content added Content deleted
(Added Tiny BASIC example) |
No edit summary |
||
Line 526: | Line 526: | ||
DATA "No more","Go to the store and buy some more. 99" |
DATA "No more","Go to the store and buy some more. 99" |
||
END</lang> |
END</lang> |
||
==={{header|Gambas}}=== |
|||
Implementation of the code '99 bottles of beer' written in Visual Basic. |
|||
Code tested in Gambas 3.15.2 |
|||
<lang Gambas>' Gambas module file |
|||
Public Const bottlesofbeer As String = " bottles of beer." |
|||
Public Const onthewall As String = " on the wall." |
|||
Public Const takeonedown As String = "Take one down, pass it around." |
|||
Public Const onebeer As String = "1 bottle of beer" |
|||
Public Sub Main() |
|||
Dim bottles As Byte |
|||
For bottles = 99 To 3 Step -1 |
|||
Print CStr(bottles) & bottlesofbeer & onthewall |
|||
Print CStr(bottles) & bottlesofbeer |
|||
Print takeonedown |
|||
Print CStr(bottles - 1) & bottlesofbeer & onthewall |
|||
Print |
|||
Next |
|||
Print "2" & bottlesofbeer & onthewall |
|||
Print "2" & bottlesofbeer |
|||
Print takeonedown |
|||
Print onebeer & onthewall |
|||
Print |
|||
Print onebeer & onthewall |
|||
Print onebeer |
|||
Print takeonedown |
|||
Print "No more" & bottlesofbeer & onthewall |
|||
Print |
|||
Print "No" & bottlesofbeer & onthewall |
|||
Print "No" & bottlesofbeer |
|||
Print "Go to the store, buy some more." |
|||
Print "99" & bottlesofbeer & onthewall |
|||
End</lang> |
|||
==={{header|Integer BASIC}}=== |
==={{header|Integer BASIC}}=== |