Created
February 8, 2016 22:49
-
-
Save guaracy/72b7d041c03ca3ece02c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
max : integer = 99; | |
bottles : integer; | |
bottle_word : string; | |
begin | |
for bottles := max downto 1 do begin | |
if bottles = 1 then | |
bottle_word := 'bottle' | |
else | |
bottle_word := 'bottles'; | |
if bottles <> max then begin | |
writeln('Take one down and pass it arround'); | |
writeln(bottles, ' ', bottle_word, ' of beer on the wall.'); | |
writeln; | |
end; | |
writeln(bottles, ' ', bottle_word, ' of beer on the wall'); | |
writeln(bottles, ' ', bottle_word, ' of beer'); | |
end; | |
writeln('Take one down and pass it arround'); | |
writeln('No more bottles of beer on the wall.'); | |
writeln; | |
writeln('Go to the store and buy some more'); | |
writeln(max, ' bottles of beer on the wall.'); | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment