begin Write('x, a,b,c ='); Readln(x, a, b, c); Writeln('Xнач, Xконе, dX ='); Readln(start, finish, dx); if (x<3)and(b<>0) then begin while (start < finish)do begin x:= start; Writeln('F = ', a*x*x - b*x + c); start:= start +dx; end; end else if (x>3)and(b<>0) then begin while (start < finish)do begin x:= start; if x-c = 0 then writeln('No solution') else Writeln('F = ', (x-a)/(x-c)); start:= start + dx; end; end else begin while (start < finish)do begin x:= start; if c = 0 then writeln('No solution') else Writeln('F = ', x/c); start:= start +dx; end; end end.
Answers & Comments
start,finish, x, a, b, c,dx:real;
begin
Write('x, a,b,c =');
Readln(x, a, b, c);
Writeln('Xнач, Xконе, dX =');
Readln(start, finish, dx);
if (x<3)and(b<>0) then
begin
while (start < finish)do
begin
x:= start;
Writeln('F = ', a*x*x - b*x + c);
start:= start +dx;
end;
end
else if (x>3)and(b<>0) then
begin
while (start < finish)do
begin
x:= start;
if x-c = 0 then writeln('No solution') else
Writeln('F = ', (x-a)/(x-c));
start:= start + dx;
end;
end
else
begin
while (start < finish)do
begin
x:= start;
if c = 0 then writeln('No solution') else
Writeln('F = ', x/c);
start:= start +dx;
end;
end
end.