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