Sip langsung aja
untuk kecepatan ini penampakan saat runya
Codingnya untuk button kecepatan seperti ini
<
procedure TFKJW.Button1Click(Sender: TObject);
Var
a,b:Real;
begin
a:=StrToFloat(EJarak.Text);
b:=StrToFloat(EWaktu.Text);
If (Combobox1.ItemIndex=0) And
(ComboBox2.ItemIndex=0) then
Begin
LHasil.Caption:=FloatToStr(a/b) + ' Km/Jam' ;
End
Else If (Combobox1.ItemIndex=0) And
(ComboBox2.ItemIndex=1) then
Begin
LHasil.Caption:=FloatToStr(a/(b/60)) + ' Km/Jam' ;
End
Else If (Combobox1.ItemIndex=0) And
(ComboBox2.ItemIndex=2) then
Begin
LHasil.Caption:=FloatToStr(a/(b/3600)) + ' Km/Jam' ;
End
Else If (Combobox1.ItemIndex=1) And
(ComboBox2.ItemIndex=0) then
Begin
LHasil.Caption:=FloatToStr((a/100)/b) + ' Km/Jam' ;
End
Else If (Combobox1.ItemIndex=1) And
(ComboBox2.ItemIndex=1) then
Begin
LHasil.Caption:=FloatToStr((a/100)/(b/60)) + ' Km/Jam' ;
End
Else If (Combobox1.ItemIndex=1) And
(ComboBox2.ItemIndex=2) then
Begin
LHasil.Caption:=FloatToStr((a/100)/(b/3600)) + ' Km/Jam' ;
End;
end;
Untuk mencari jarak penampakannya seperti ini
Codingnya seperti ini :
<
procedure TFKJW.Button7Click(Sender: TObject);
Var a,b: Real;
begin
a:=StrToFloat(EDit2.Text);
b:=StrToFloat(EDit3.Text);
If (ComboBox6.ItemIndex=0) And
(ComboBox5.ItemIndex=0) then
Begin
Label14.Caption:=FloatToStr(a*b) + ' Km' ;
End
Else If (Combobox6.ItemIndex=0) And
(ComboBox5.ItemIndex=1) then
Begin
Label14.Caption:=FloatToStr(a*(b/60)) + ' Km' ;
End
Else If (Combobox6.ItemIndex=0) And
(ComboBox5.ItemIndex=2) then
Begin
Label14.Caption:=FloatToStr(a*(b/3600)) + ' Km' ;
End
Else If (Combobox6.ItemIndex=1) And
(ComboBox5.ItemIndex=0) then
Begin
Label14.Caption:=FloatToStr((a/100)*b) + ' Km' ;
End
Else If (Combobox6.ItemIndex=1) And
(ComboBox5.ItemIndex=1) then
Begin
Label14.Caption:=FloatToStr((a/100)*(b/60)) + ' Km' ;
End
Else If (Combobox6.ItemIndex=1) And
(ComboBox5.ItemIndex=2) then
Begin
Label14.Caption:=FloatToStr((a/100)*(b/3600)) + ' Km' ;
End;
end;
Untuk mencari Waktu penampakannya seperti ini:
Codingnya seperti ini:
<
procedure TFKJW.Button4Click(Sender: TObject);
Var a,b: Real;
begin
a:=StrToFloat(Edit1.Text);
b:=StrToFloat(EKecepatan.Text);
If (Combobox4.ItemIndex=0) And
(ComboBox3.ItemIndex=0) then
Begin
Label9.Caption:=FloatToStr(a/b) + ' Jam' ;
End
Else If (Combobox4.ItemIndex=0) And
(ComboBox3.ItemIndex=1) then
Begin
Label9.Caption:=FloatToStr(a/(b/100)) + ' Jam' ;
End
Else If (Combobox4.ItemIndex=1) And
(ComboBox3.ItemIndex=0) then
Begin
Label9.Caption:=FloatToStr((a/100)/b) + ' Jam' ;
End
Else If (Combobox4.ItemIndex=1) And
(ComboBox3.ItemIndex=1) then
Begin
Label9.Caption:=FloatToStr((a/100)/(b/100)) + ' Jam' ;
End;
end;
Untuk Coding lengkapnya seperti ini:
<
>
Tidak ada komentar:
Posting Komentar