На Pascal
var x, y: integer;
begin
readln(x);
y := 0;
if (x > 0) and (x < 5) then
y := 2 * x;
if x = 0 then
if (x < 0) and (x > -5) then
y := 3 * x;
writeln(y);
end.
На Pascal
var x, y: integer;
begin
readln(x);
y := 0;
if (x > 0) and (x < 5) then
y := 2 * x;
if x = 0 then
y := 0;
if (x < 0) and (x > -5) then
y := 3 * x;
writeln(y);
end.