Skip to content

case .. of

Pascal case in Pascal

Flowchart (ISO 5807)

YesNoYesNoStartInput cc = 1Output «Червоний»c = 2Output «Зелений»Output «Інший»EndFigure 1 — Colors

Source code

Pascal
program Colors;
var c: integer;
begin
  readln(c);
  case c of
    1: writeln('Червоний');
    2: writeln('Зелений');
  else
    writeln('Інший');
  end;
end.

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

Language
Pascal
Constructs
case in Pascal
Topic
Switch / case
Formats
Word, Visio, draw.io, PDF, SVG

Related examples