var x,f:real;
begin
writeln('Введите значение x: ');
readln(x);
if (x>=0) and (x<=1) then
f:=x*2-x;
writeln('f = ',f);
end
else
if (x>1) or (x<0) then
f:=x*2;
end;
end.
var x,f:real;
begin
writeln('Введите значение x: ');
readln(x);
if (x>=0) and (x<=1) then
begin
f:=x*2-x;
writeln('f = ',f);
end
else
begin
if (x>1) or (x<0) then
f:=x*2;
writeln('f = ',f);
end;
end.