procedure TForm1.N8Click(Sender: TObject);
const a=0.44;
b=2.28;
var x,l,x1,x2,d:real;
y:real;
f:textfile;
s1,:string;
begin
If Edit1.Text <> '' then x1:=strtofloat(Edit1.Text);
if Edit2.Text <> '' then x2:=strtofloat(Edit2.Text);
if Edit3.Text <> '' then d:=strtofloat(Edit3.Text)
else
l:=messagedlg('ошибка',mterror,[mbOk],0);
x:=x1;
while x<=x2 do
if checkbox2.Checked then begin assignfile(f,'text.txt');
rewrite(f);end;
s1:=' x'+' '+'f(x)';
memo1.Lines.Add(' x'+' '+'f(x)');
begin
begin
y:=a*sqr(sin(x/2)/cos(x/2))/(b+0.7*x);
s1:=floattostr(x)+' '+floattostrf(y,fffixed,10,5);
if CheckBox1.checked then
memo1.LineS.add(s1);
if checkbox2.checked then
writeln(f,s1);
if checkbox3.checked then
series1.addxy(x,y,'',clred);
end;
x:=x+d;
end;
end;
Социальные закладки