Aşağıdaki kodları
hesapla butonuna yazınız.
protected void
Button1_Click(object sender, EventArgs e)
{
double fiyat, kdv, toplam ;
fiyat = Convert.ToDouble(TextBox1.Text);
kdv= Convert.ToDouble(TextBox2.Text);
toplam =
fiyat + ( fiyat * kdv / 100) ;
if (CheckBox1.Checked == true)
{
toplam =
toplam - toplam *0.05 ;
}
Label1.Text = "ürününün toplam fiyatı
" + toplam;
}
Hiç yorum yok:
Yorum Gönder