srzontmp
Var x,y: real; begin write('x = '); readln(x); y:=0; if x>1 then y:=x*x-sin(x*x*pi); if (x>0) and (x<=1) then y:=x*x-x; writeln('f(x) = ',y); end.
1 votes Thanks 1
srzontmp
Если в трансляторе нет константы pi, то вместо нее можно записать 6*arctan(1/sqrt(3))
Answers & Comments
Verified answer
Program n1;var x,f: real;
begin
readln(x);
if x<=0 then f:=0 else if (x>0) and (x<=1) then f:=x*x-x
else f:=x*x-sin(pi*x*x);
write(f);
end.
begin
write('x = '); readln(x);
y:=0;
if x>1 then y:=x*x-sin(x*x*pi);
if (x>0) and (x<=1) then y:=x*x-x;
writeln('f(x) = ',y);
end.