Anonymous user
99 Bottles of Beer/Pascal: Difference between revisions
→{{header|Pascal}}: Modified so that it's a stand-alone program, and eliminated "Format" since not all Pascals support that. Simplified code a little bit.
(moving code from main task-page to sub-page) |
(→{{header|Pascal}}: Modified so that it's a stand-alone program, and eliminated "Format" since not all Pascals support that. Simplified code a little bit.) |
||
Line 99:
=={{header|Pascal}}==
<lang pascal>
var
i: Integer;
begin
for i := 99 downto 1 do
if i = 1 then begin
if i = 1 then▼
writeln('One bottle of beer');
writeln(i, ' bottles of beer');
▲ WriteLn(Format('%d bottles of beer on the wall', [i]));
else
▲ WriteLn('Take one down, pass it around');
▲end;</lang>
|