program penjualan tiket menggunakan Delphi..
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Text := '';
Edit2.Text := '';
Edit3.Text := '';
Edit4.Text := '';
Edit5.Text := '';
Edit6.Text := '';
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Button1Click(Sender: TObject);
var K : String;
Hrg,U,HT,HB,D,DR : Real;
begin
K := Uppercase(Edit1.Text);
U := StrToFloat(Edit2.Text);
if K ='A' then
Hrg:= 2000000
else if K ='B' then
Hrg:= 1500000
else
Hrg:= 1000000;
if U <= 12 then
D:= 50
else if U <60 then
D:= 0
else
D:= 25;
DR := Hrg * D/100;
HB := Hrg - DR;
Edit3.Text := FloatToStr(Hrg);
Edit4.Text := FloatToStr(D);
Edit5.Text := FloatToStr(DR);
Edit6.Text := FloatToStr(HB);
end;
end.
Semoga bermanfaat .. :)
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Text := '';
Edit2.Text := '';
Edit3.Text := '';
Edit4.Text := '';
Edit5.Text := '';
Edit6.Text := '';
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Button1Click(Sender: TObject);
var K : String;
Hrg,U,HT,HB,D,DR : Real;
begin
K := Uppercase(Edit1.Text);
U := StrToFloat(Edit2.Text);
if K ='A' then
Hrg:= 2000000
else if K ='B' then
Hrg:= 1500000
else
Hrg:= 1000000;
if U <= 12 then
D:= 50
else if U <60 then
D:= 0
else
D:= 25;
DR := Hrg * D/100;
HB := Hrg - DR;
Edit3.Text := FloatToStr(Hrg);
Edit4.Text := FloatToStr(D);
Edit5.Text := FloatToStr(DR);
Edit6.Text := FloatToStr(HB);
end;
end.
Semoga bermanfaat .. :)
Tidak ada komentar:
Posting Komentar