1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38:
| function tform1.f(x:extended):extended; begin f:=(0.5*x*x*x)-(x*x)-(2*x)+2; end;
function tform1.vzw(x1,x2:extended):boolean; begin vzw:= x1 * x2 < 0; end;
procedure tform1.wertetabelle(a,e,s:extended); var x:extended; begin x:=a-s; repeat x:=x+s; listbox1.Items.add('x= '+floattostrf(x,ffnumber,15,4) + ' f(x)= ' +floattostrf(f(x),ffnumber,15,4)); until x>e;
end;
procedure TForm1.Button2Click(Sender: TObject); var anfang,ende,schritt:extended; begin anfang:=strtofloat(labelededit1.text); ende:=strtofloat(labelededit2.text); schritt:=strtofloat(labelededit3.text); wertetabelle(anfang,ende,schritt); end;
procedure TForm1.Button3Click(Sender: TObject); begin listbox1.Clear; end;
end. |