31 Ocak 2014 Cuma

Kurs Fiyatlarını Hesaplayan Program


6radiobutton,1checkbox,1edit,1button,3label,3GroupBox ekleyiniz. Kurs fiyatlarını hesaplayan programın kodu.
Kodu;
procedure TForm1.FormCreate(Sender: TObject);
begin
RadioButton1.Checked:=true;
RadioButton5.Checked:=true;
CheckBox1.Checked:=true;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
katsayi,kdvorani:Integer;
fiyat:Currency;
begin
katsayi:=100;
if CheckBox1.Checked then
Dec(katsayi,20);
if RadioButton5.Checked then
kdvorani:=20
else
kdvorani:=25;
if RadioButton1.Checked then
fiyat:=2000*(kdvorani+katsayi)/100
else if RadioButton2.Checked then
fiyat:=1500*(kdvorani+katsayi)/100
else if RadioButton3.Checked then
fiyat:=2500*(kdvorani+katsayi)/100
else if RadioButton4.Checked then
fiyat:=4000*(kdvorani+katsayi)/100;
Edit1.Text:=FloatToStr(fiyat);
end;
end.

Hiç yorum yok:

Yorum Gönder