Молниезащита зданий и сооружений. Часть2. Анфилофьев Б.А - 8 стр.

UptoLike

{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit2,math, unit1, Unit4, Unit5;
var
r,N,rx,h,h0,n1:real;
a,hx,b,l:integer;
{$R *.DFM}
procedure TForm3.Button2Click(Sender: TObject);
begin
Form3.Hide;
Form2.Show;
end;
procedure TForm3.Button3Click(Sender: TObject);
begin
Halt(1);
end;
procedure TForm3.Button1Click(Sender: TObject);
begin
If (Form3.Edit3.Text<>'') and (Form3.edit1.Text<>'') and (
form3.Edit2.Text<>'') then
begin n:=strtoint(form3.Edit2.Text);
hx:=StrToInt(Form3.Edit3.text);
l:=StrToInt(Form3.Edit1.Text);
r:=3.5*hx;
N:=(power(10,(-6)))*3.14*(power((3.5*hx),2))*n;
if N<0 then begin form3.Label7.caption:='A';
rx:=sqr((power((r/2),2))+(power((l+r),2))); h:=(rx+(1.63*hx)/1.5);
form3.Label11.caption:=FloatToStr(rx);
form3.label13.Caption:=floattostr(h); end else rx:=1.5*(150-hx/0.92);
h:=(rx+(1.63*hx)/1.5); label7.Caption:='Б';
form3.Label11.Caption:=floattostr(rx);
form3.label13.Caption:=floattostr(h)
end else form5.show;
end;
end.
Модуль четвертый
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm4 = class(TForm)
Button1: TButton;