39;, '.']) then key: = # 0;
end;
В
end.
unit unit3;
interface
uses
Windows, Math, Messages, SysUtils, Variants,
Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus, ComCtrls;
type
TForm3 = class (TForm)
Label2: TLabel;
Edit1: TEdit;
Memo1: TMemo;
Edit3: TEdit;
Label1: TLabel;
MainMenu1: TMainMenu;
N1: TMenuItem;
N4: TMenuItem;
N7: TMenuItem;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit2: TEdit;
procedure Edit1KeyPress (Sender: TObject; var Key: Char);
procedure N4Click (Sender: TObject);
procedure N7Click (Sender: TObject);
procedure Button1Click (Sender: TObject);
procedure Button2Click (Sender: TObject);
procedure Button3Click (Sender: TObject);
private
{Private declarations tion}
public
{Public declarations}
end;
var
Form3: TForm3;
i, j, A, k: Integer;
Y, X: array [1 .. 30] of Extended;
t, P, Dl: Real;
implementation
uses Unit1, Unit2, Unit6;
{$ R *. dfm}
procedure TForm3.Edit1KeyPress (Sender: TObject; var Key: Char);// Integer
begin
if not (key in ['0 '.. '9']) then Key: = # 0;
end;
procedure TForm3.N4Click (Sender: TObject);
begin
Close;
end;
procedure TForm3.N7Click (Sender: TObject);
begin
AboutBox.ShowModal;
end;
function Ln (k: integer): Real;
var Proizved1, Proizved2: Real;
begin
t: = StrToFloat (Form3.Edit1.Text);
i: = 1;
Proizved1: = 1;
Proizved2: = 1;
repeat
if k <> i then begin
Proizved1: = Proizved1 * (t-x [i]);
Proizved2: = Proizved2 * (x [k]-x [i]);
end;
i: = i +1;
until i> A;
Ln: = Proizved1/Proizved2;
end;
function Pol (): Real;
var
Sum: Real;
i: Integer;
begin
i: = 1;
Sum: = 0;
repeat
Sum: = Ln (i) * Y [i] + Sum;
i: = i +1;
until i> A;
Pol: = Sum;
end;
function Delta (): Real;
var
Sum: Real;
i: Integer;
begin
i: = 1;
Sum: = 0;
repeat
Sum: = ABS (Ln (i)) * 0.0002 + Sum;
i: = i +1;
until i> A;
Delta: = Sum;
end;
procedure TForm3.Button1Click (Sender: TObject);
var
i: Integer;
S: real;
begin
A: = Str...