<code>program Project4;
{$APPTYPE CONSOLE}
uses
SysUtils,
Math;
procedure F(x,e:real);
var y0,y1:real;
begin
y0:=1;
y1:=1.5*y0-0.5*x*sqr(y0)*y0;
while Abs (y0-y1)>e do
begin
y0:=y1;
y1:=1.5*y0-0.5*x*sqr(y0)*y0;
end;
writeln('y=',y1:0:5);
write('1/sqrt(x)=', 1/sqrt(x):0:5);
end;
var x,e:real;
begin
e:=0.00001;
x:=2;
F(x,e);
Readln;
{ TODO -oUser -cConsole Main : Insert code here }
end.
</code>
Ошибки логические.
<code>
program Project3;
{$APPTYPE CONSOLE}
uses
SysUtils;
var x,a,y,b,h,p:Real;
i,n:Integer;
function f1(x:Real):Real;
var yy:Real;
begin
yy:=(sqr(sqr(x)))+sqr(x)*x-10*sqr(x)-34*x-25;
f1:=yy;
end;
begin
a:=-2;
b:=0;
h:=0.1;
writeln ('a= ',a:4:0);
writeln ('b= ',b:4:0);
writeln ('h= ',h:4:1);
n:=Round((b-a)/h);
writeln ('n= ',n:4);
p:=1;
x:=a;
y:=f1(x);
writeln ('x= ',x:4:0);
writeln ('y= ',y:4:0);
writeln ('proizvedenie y>0 ravno',p:5:2);
if y>0
then p:=p*y;
for i:=1 to n do
begin
x:=x+h;
y:=f1(x);
writeln ('x= ',x:4:2);
writeln ('y= ',y:4:2);
Readln;
if y>0
then p:=p*y;
writeln ('proizvedenie y>0 ravno ',p:5:2);
end;
writeln ('proizvedenie y>0 ravno ',p:5:2);
readln;
end.
</code>