Execute HQ9+: Difference between revisions

Content added Content deleted
(Added COBOL solution.)
m (→‎{{header|COBOL}}: Improved 99 Beer Bottles part.)
Line 230: Line 230:


WHEN "9"
WHEN "9"
PERFORM WITH TEST AFTER VARYING bottles
MOVE 99 TO bottles
FROM 99 BY -1 UNTIL bottles = ZERO
PERFORM UNTIL bottles = ZERO
DISPLAY
DISPLAY
bottles " bottles of beer on the wall"
bottles " bottles of beer on the wall"
Line 239: Line 239:
DISPLAY
DISPLAY
bottles " bottles of beer on the wall"
bottles " bottles of beer on the wall"
DISPLAY SPACE
END-PERFORM
END-PERFORM