Unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 =
class(TForm)u
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Button1: TButton;
Edit9: TEdit;
Edit10: TEdit;
Button4: TButton;
Button3: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
var
a,b,a1,b1,a2,b2,c2,d2,a3,b3:integer;
begin
a:=strtoint(edit1.text);
b:=strtoint(edit2.text);
a1:=strtoint(edit6.text);
b1:=strtoint(edit7.text);
a2:=a*b1;
b2:=b*b1;
c2:=a1*b;
d2:=b1*b;
a3:=a2+c2;
b3:=d2;
edit9.Text:=inttostr(a3);
edit10.Text:=inttostr(b3);
end;
procedure TForm2.Button2Click(Sender: TObject);
var
a,b,a1,b1,a2,b2,c2,d2,a3,b3:integer;
begin
a:=strtoint(edit1.text);
b:=strtoint(edit2.text);
a1:=strtoint(edit6.text);
b1:=strtoint(edit7.text);
a2:=a*b1;
b2:=b*b1;
c2:=a1*b;
d2:=b1*b;
a3:=a2-c2;
b3:=d2;
edit9.Text:=inttostr(a3);
edit10.Text:=inttostr(b3);
end;
procedure TForm2.Button3Click(Sender: TObject);
var
a,b,a1,b1,a2,b2:integer;
begin
a:=strtoint(edit1.text);
b:=strtoint(edit2.text);
a1:=strtoint(edit6.text);
b1:=strtoint(edit7.text);
a2:=a*a1;
b2:=b*b1;
edit9.Text:=inttostr(a2);
edit10.Text:=inttostr(b2);
end;
procedure TForm2.Button4Click(Sender: TObject);
var
a,b,c,d,a1,b1,c1,d1,a2,b2:integer;
begin
a:=strtoint(edit1.text);
b:=strtoint(edit2.text);
a1:=strtoint(edit6.text);
b1:=strtoint(edit7.text);
a2:=a*b1;
b2:=b*a1;
edit9.Text:=inttostr(a2);
edit10.Text:=inttostr(b2);
end;
end.