program p3;
var x,a,b,c: real;
function F(x):real;
var y: real;
begin
if x>0 then
y := a*sqr(x)-b*x+9.0
else
y := c/(sqr(x)*x+8.0)'
F:=y;
end;
writeln ('A=?');
readln(a);
writeln ('B=?');
readln(b);
writeln ('C=?');
readln(c);
writeln ('x=?');
readln(x);
writeln('F(',x,')=',F(x));
end.
Объяснение:
program p3;
var x,a,b,c: real;
function F(x):real;
var y: real;
begin
if x>0 then
y := a*sqr(x)-b*x+9.0
else
y := c/(sqr(x)*x+8.0)'
F:=y;
end;
begin
writeln ('A=?');
readln(a);
writeln ('B=?');
readln(b);
writeln ('C=?');
readln(c);
writeln ('x=?');
readln(x);
writeln('F(',x,')=',F(x));
end.
Объяснение: