RosettaCodeData/Task/99-bottles-of-beer/ABC/99-bottles-of-beer.abc
2024-04-20 12:30:13 -07:00

19 lines
556 B
Text

HOW TO RETURN bottles n:
SELECT:
n<0: RETURN "99 bottles"
n=0: RETURN "No more bottles"
n=1: RETURN "1 bottle"
n>1: RETURN "`n` bottles"
HOW TO SING VERSE n:
WRITE "`bottles n` of beer on the wall,"/
WRITE "`bottles n` of beer,"/
SELECT:
n=0: WRITE "Go to the store and buy some more,"/
n=1: WRITE "Take it down and pass it around,"/
n>1: WRITE "Take one down and pass it around,"/
WRITE "`bottles (n-1)` of beer on the wall."/
WRITE /
FOR n IN {0..99}:
SING VERSE 99-n