← All examples

for .. downto

Pascal Loops

descending for

Flowchart (ISO 5807)

Starti = 5, 1, -1Output iEndFigure 1 — Countdown

Source code

program Countdown;
var i: integer;
begin
  for i := 5 downto 1 do
    writeln(i);
end.