'set fridge capacity, beverage type, and container type X = 99 B$ = "beer" C$ = "bottle" 'build number strings so "0" can be sung correctly in second to last verse DIM N$(X) FOR L = 1 TO X N$(L) = LTRIM$(STR$(L)) NEXT N$(0) = "no more" 'fully stock the fridge, and then start singing! F = X DO 'each verse has four "phrases" FOR P = 1 TO 4 SELECT CASE P: 'three phrases are very similar - first, second, and fourth CASE 1, 2, 4: 'use some boolean algebra to handle the "what-ifs": PRINT N$(F); " "; C$; LEFT$("s", -(F <> 1)); " of "; B$; '-(F=1) evaluates to 1 when F=1.... [-(-1)] ' 0 when F<>1... [-(0) ] '(don't want to pluralize a lone container) PRINT LEFT$(" on the wall", -12 * (P <> 2)); '-12*(P<>2) evaluates to 0 when P=2.... [-12*(0) ] ' 12 when P<>2... [-12*(-1)] '(don't want