program fantscrin;
var x,f:real;
begin
write('X = '); readln(x);
if (x<-2) then f:=-2;
if ((x<2)and(x>-2)) then f:=x*x*x;
if (x>2) then f:=x+2;
writeln(f);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program fantscrin;
var x,f:real;
begin
write('X = '); readln(x);
if (x<-2) then f:=-2;
if ((x<2)and(x>-2)) then f:=x*x*x;
if (x>2) then f:=x+2;
writeln(f);
end.