99 Bottles of Beer/Pascal: Difference between revisions

Content added Content deleted
m (→‎{{header|Pascal}}: indentation changes)
m (→‎{{header|Pascal}}: the special case really should be second)
Line 106: Line 106:
begin
begin
for i := 99 downto 1 do
for i := 99 downto 1 do
if i = 1 then
if i <> 1 then
begin
writeln('One bottle of beer on the wall');
writeln('One bottle of beer');
writeln('Take one down, pass it around');
writeln('No more bottles of beer on the wall');
end
else
begin
begin
writeln(i, ' bottles of beer on the wall');
writeln(i, ' bottles of beer on the wall');
Line 123: Line 116:
writeln(i - 1, ' bottles of beer on the wall');
writeln(i - 1, ' bottles of beer on the wall');
writeln;
writeln;
end;
end
else
end.
begin
</lang>
writeln('One bottle of beer on the wall');
writeln('One bottle of beer');
writeln('Take one down, pass it around');
writeln('No more bottles of beer on the wall');
end
end.</lang>