Beruflich Dokumente
Kultur Dokumente
SERI
unit Unit14;
interface
uses
type
TForm14 = class(TForm)
Image1: TImage;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form14: TForm14;
implementation
uses Unit13;
{$R *.dfm}
begin
form13.show;
form14.Hide;
end;
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;
begin
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
end;
end.
PAREALEL
unit Unit15;
interface
uses
type
TForm15 = class(TForm)
Image1: TImage;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form15: TForm15;
implementation
uses Unit13;
{$R *.dfm}
begin
form13.show;
form15.Hide;
end;
begin
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
end;
procedure TForm15.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;
end.
SERI PARALEL
unit Unit16;
interface
uses
type
TForm16 = class(TForm)
Image1: TImage;
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Label2: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form16: TForm16;
implementation
uses Unit13;
{$R *.dfm}
begin
form13.show;
form16.Hide;
end;
begin
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
end;
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+1/((1/l2)+(1/l3));
edit5.Text:=floattostr(ltot);
end;
end.