Skip to content

Doubling

Pascal readln / writeln

Flowchart (ISO 5807)

StartInput xOutput x·2EndFigure 1 — Double

Source code

Pascal
program Double;
var x: integer;
begin
  readln(x);
  writeln(x * 2);
end.

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

Language
Pascal
Constructs
readln / writeln
Topic
Input/Output
Formats
Word, Visio, draw.io, PDF, SVG

Related examples