var
x, y: integer;
begin
write ('x = ');
readln (x);
if x > 0 then
y := x - 2
else
if x = 0 then
y := 0
y := abs(x);
writeln ('y = ', y);
end.
Объяснение:
var
x, y: integer;
begin
write ('x = ');
readln (x);
if x > 0 then
y := x - 2
else
if x = 0 then
y := 0
else
y := abs(x);
writeln ('y = ', y);
end.
Объяснение:
var
x, y: integer;
begin
write ('x = ');
readln (x);
if x > 0 then
y := x - 2
else
if x = 0 then
y := 0
else
y := abs(x);
writeln ('y = ', y);
end.