На Python
x = int(input())
if 5 > x > 0:
y = 2 * x
elif x == 0:
y = 0
elif -5 < x < 0:
y = 3 * x
print(y)
На 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.
На Python
x = int(input())
if 5 > x > 0:
y = 2 * x
elif x == 0:
y = 0
elif -5 < x < 0:
y = 3 * x
print(y)
На 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.