Professional Documents
Culture Documents
Word de Programa
Word de Programa
unit cal;
interface
uses
StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Calcular: TButton;
Terminar: TButton;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
Edit4: TEdit;
Label5: TLabel;
Edit5: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
Const
Pi= 3.141592654;
var
A1,D,C,W2,W1,F,Fd,C1,Xl,Z,Angulo: Extended;
begin
A1:=StrToFloat(Edit4.text);
D:=(180.0-A1)/(180.0/Pi);
W2:=StrToFloat(Edit3.text);
W1:=StrToFloat(Edit1.text);
C:=0.01;
lab1:
F:=W2*cos(D-C)/(sin(D-C)*sin(D-C))-W1*cos(C)/(sin(C)*sin(C));
Fd:=W2*(sin(D-C)*sin(D-c)+2*cos(D-C)*cos(D-C))/(sin(D-C)*sin(D-C)*sin(D-C));
Fd:= Fd + W1*(sin(C)*sin(C)+2*cos(C)*cos(C))/(sin(C)*sin(C)*sin(C));
C1:= C-F/Fd;
Z:=C1-C;
begin
if z< 0.0 then
begin
c:=c1;
goto lab1;
end
else
goto lab2
else
goto Lab2
else
begin
c:= c1;
goto Lab1
end;
end;
lab2:
Angulo:= c1*180/pi;
xl := w2/sin(D-c1)+ w1/sin(c1);
Edit2.text := FloatToStr(Xl);
Edit5.text := FloatToStr(Angulo);
end;
begin
application.terminate
end;
end.