Variant 1
begin
var x := ReadInteger('Введите X:= ');
if x > 2 then
Println('Y:= ', 2 * x)
else
Println('Y:= ', x + 5);
end.
Varian 2
var
x, y: integer;
Writeln('Введите Х: ');
Read(x);
y := 2 * x;
end
y := x + 5;
Write(y);
Variant 1
begin
var x := ReadInteger('Введите X:= ');
if x > 2 then
Println('Y:= ', 2 * x)
else
Println('Y:= ', x + 5);
end.
Varian 2
var
x, y: integer;
begin
Writeln('Введите Х: ');
Read(x);
if x > 2 then
begin
y := 2 * x;
end
else
y := x + 5;
Write(y);
end.