var
a,b,c,Xn,Xk,dX,F,F1:extended;
st:string;
begin
a:=StrToFloat(Edit1.Text);
b:=StrToFloat(Edit2.Text);
c:=StrToFloat(Edit3.Text);
Xn:=StrToFloat(Edit4.Text);
Xk:=StrToFloat(Edit5.Text);
dX:=StrToFloat(Edit6.Text);
while Xn<=Xk do
begin
if (Xn<0)AND(b<>0) then
F1:=a*Xn*Xn+b;
if (Xn>0)AND(b=0) then
F1:=(Xn-a)/(Xn-c)
else
F1:=Xn/c;
if ((trunc(a) or trunc(b)) and (trunc(a) or trunc(c)))<>0 then
F:=F1
else
F:=int(F1);
st := st + #10 + FloatToStr(Xn) + #9 + FloatToStr(F);
Xn:=Xn+dX;
end;
Label7.Caption := st;
Задача 2.
const
N=10;
var
i,j,f,imax,imin:integer;
sum, pr,max,min,buf:extended;
mas,mas1:array[1..N] of extended;
st,st1:string;
begin
sum:=0;
pr:=1;
max:=-10;
min:=15;
for i:=1 to N do
begin
mas[i]:=random(100)/4 - 10;
st := st + #10 + FloatToStr(mas[i]);
if mas[i]<0 then sum:=sum+mas[i];
if mas[i]>=max then
begin
max:=mas[i];
imax:=i;
end;
if mas[i]<=min then
begin
min:=mas[i];
imin:=i;
end;
end;
Читать дальше