var x,i:integer;f:Real;
begin
for x:=-4 to 4 do begin
if (x >= (-2)) and (x < 0) then
f:= sqr(x)
else if (x > 0)and(x < 2) then
f:= sqrt(x)
else if x > 2 then
f:= x -1;
writeln(x:3,f:6 );
end;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var x,i:integer;f:Real;
begin
for x:=-4 to 4 do begin
if (x >= (-2)) and (x < 0) then
f:= sqr(x)
else if (x > 0)and(x < 2) then
f:= sqrt(x)
else if x > 2 then
f:= x -1;
writeln(x:3,f:6 );
end;
end.