Advertisement
rikokurniawan

Jarak

Dec 29th, 2012
1,091
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.01 KB | None | 0 0
  1. procedure TFKJW.Button7Click(Sender: TObject);
  2. Var a,b: Real;
  3. begin
  4.   a:=StrToFloat(EDit2.Text);
  5.   b:=StrToFloat(EDit3.Text);
  6.   If (ComboBox6.ItemIndex=0) And
  7.     (ComboBox5.ItemIndex=0) then
  8.     Begin
  9.       Label14.Caption:=FloatToStr(a*b) + ' Km' ;
  10.     End
  11.   Else If (Combobox6.ItemIndex=0) And
  12.     (ComboBox5.ItemIndex=1) then
  13.     Begin
  14.       Label14.Caption:=FloatToStr(a*(b/60)) + ' Km' ;
  15.     End
  16.   Else If (Combobox6.ItemIndex=0) And
  17.     (ComboBox5.ItemIndex=2) then
  18.     Begin
  19.       Label14.Caption:=FloatToStr(a*(b/3600)) + ' Km' ;
  20.     End
  21.   Else If (Combobox6.ItemIndex=1) And
  22.     (ComboBox5.ItemIndex=0) then
  23.     Begin
  24.       Label14.Caption:=FloatToStr((a/100)*b) + ' Km' ;
  25.     End
  26.   Else If (Combobox6.ItemIndex=1) And
  27.     (ComboBox5.ItemIndex=1) then
  28.     Begin
  29.       Label14.Caption:=FloatToStr((a/100)*(b/60)) + ' Km' ;
  30.     End
  31.   Else If (Combobox6.ItemIndex=1) And
  32.     (ComboBox5.ItemIndex=2) then
  33.     Begin
  34.       Label14.Caption:=FloatToStr((a/100)*(b/3600)) + ' Km' ;
  35.     End;
  36. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement