Код:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Edit4: TEdit; Edit5: TEdit; Edit6: TEdit; Edit7: TEdit; Edit8: TEdit; Edit9: TEdit; Button1: TButton; Label1: TLabel; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; a11,a12,a13,a14,a15 : real; a21,a22,a23,a24,a25 : real; a31,a32,a33,a34,a35 : real; v1,v2,v3,v4,v5,v6 : real; zz : real; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin zz := 0; end; procedure TForm1.Button1Click(Sender: TObject); begin a11 := StrToFloat(Edit1.Text); a12 := StrToFloat(Edit4.Text); a13 := StrToFloat(Edit7.Text); a14 := StrToFloat(Edit1.Text); a15 := StrToFloat(Edit4.Text); a21 := StrToFloat(Edit2.Text); a22 := StrToFloat(Edit5.Text); a23 := StrToFloat(Edit8.Text); a24 := StrToFloat(Edit2.Text); a25 := StrToFloat(Edit5.Text); a31 := StrToFloat(Edit3.Text); a32 := StrToFloat(Edit6.Text); a33 := StrToFloat(Edit9.Text); a34 := StrToFloat(Edit3.Text); a35 := StrToFloat(Edit6.Text); v1 := a11 * a22 * a33; v2 := a12 * a23 * a34; v3 := a13 * a24 * a35; v4 := a13 * a22 * a31; v5 := a14 * a23 * a32; v6 := a15 * a24 * a33; zz := v1+v2+v3-v4-v5-v6; Label1.Caption := FloatToStr(zz); end; end.