Вы находитесь на странице: 1из 7

Induktor

SERI

unit Unit10;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, jpeg, ExtCtrls, StdCtrls;

type

TForm10 = class(TForm)

Image1: TImage;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;

Edit4: TEdit;

Button1: TButton;

Button2: TButton;

Button3: TButton;

Label1: TLabel;

Edit5: TEdit;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;
var

Form10: TForm10;

implementation

uses Unit9;

{$R *.dfm}

procedure TForm10.Button1Click(Sender: TObject);

var l1, l2, l3, v, ltot:real;

begin

l1:=strtofloat(edit1.Text);

l2:=strtofloat(edit2.Text);

l3:=strtofloat(edit3.Text);

v:=strtofloat(edit4.Text);

ltot:=l1+l2+l3;

edit5.Text:=floattostr(ltot);

end;

procedure TForm10.Button2Click(Sender: TObject);

begin

edit1.Text:='';

edit2.Text:='';

edit3.Text:='';

edit4.Text:='';

edit5.Text:='';

end;

procedure TForm10.Button3Click(Sender: TObject);

begin
form10.hide;

form9.show;

end;

end.

PARALEL

unit Unit11;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, jpeg, ExtCtrls;

type

TForm11 = class(TForm)

Image1: TImage;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;

Edit4: TEdit;

Edit5: TEdit;

Label1: TLabel;

Button1: TButton;

Button2: TButton;

Button3: TButton;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

private
{ Private declarations }

public

{ Public declarations }

end;

var

Form11: TForm11;

implementation

uses Unit9;

{$R *.dfm}

procedure TForm11.Button1Click(Sender: TObject);

var l1,l2,l3,v,ltot:real;

begin

l1:=strtofloat(edit1.Text);

l2:=strtofloat(edit2.Text);

l3:=strtofloat(edit3.Text);

v:=strtofloat(edit4.Text);

ltot:=1/((1/l1)+(1/l2)+(1/l3));

edit5.Text:=floattostr(ltot);

end;

procedure TForm11.Button2Click(Sender: TObject);

begin

edit1.Text:='';

edit2.Text:='';

edit3.Text:='';

edit4.Text:='';
edit5.Text:='';

end;

procedure TForm11.Button3Click(Sender: TObject);

begin

form11.Hide;

form9.show;

end;

end.

SERI PARALEL

unit Unit12;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, jpeg, ExtCtrls;

type

TForm12 = class(TForm)

Image1: TImage;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;

Edit4: TEdit;

Label1: TLabel;

Edit5: TEdit;

Button1: TButton;

Button2: TButton;
Button3: TButton;

procedure Button1Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form12: TForm12;

implementation

uses Unit9;

{$R *.dfm}

procedure TForm12.Button1Click(Sender: TObject);

var l1,l2,l3,ltot,v:real;

begin

l1:=strtofloat(edit1.Text);

l2:=strtofloat(edit2.Text);

l3:=strtofloat(edit3.Text);

v:=strtofloat(edit4.Text);

ltot:=l1+1/((1/l2)+(1/l3));

edit5.Text:=floattostr(ltot);

end;

procedure TForm12.Button3Click(Sender: TObject);


begin

form9.show;

form12.Hide;

end;

procedure TForm12.Button2Click(Sender: TObject);

begin

edit1.Text:='';

edit2.Text:='';

edit3.Text:='';

edit4.Text:='';

edit5.Text:='';

end;

end.