Sabtu, 26 Desember 2015

Parkiran




procedure TForm2.Button1Click(Sender: TObject);
var Total :integer ;
begin
if RadioButton1.Checked = true  then  begin
total := 2000 * StrToInt(edit1.Text);

Edit2.Text := IntToStr(total) ;
end

else
if RadioButton2.Checked = true then    begin
total := 1000 * StrToInt(edit1.Text) ;

Edit2.Text := IntToStr(total) ;
end else
showmessage('Isi Yang benar') ;


end;

procedure TForm2.Button2Click(Sender: TObject);
var bayar , total,sisa : integer ;
begin
bayar := strtoint(edit3.Text) ;
total := strtoint(edit2.Text) ;

if bayar >= total then begin
sisa := bayar - total ;

end else
showmessage('Pembayaran Kurang') ;
end;

Tidak ada komentar:

Posting Komentar