Skip to content

for .. downto

Pascal descending for

Flowchart (ISO 5807)

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

Source code

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

The editor opens with this code — change it and the chart redraws.

Language
Pascal
Constructs
descending for
Topic
Loops
Formats
Word, Visio, draw.io, PDF, SVG

Related examples