using System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Text;
using System.Windows.Forms;
namespace sınıflar
{
public partial class Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
private
void button1_Click(object
sender, EventArgs e)
{
}
private
void Form1_Load(object
sender, EventArgs e)
{
radioButton1.Checked = true;
radioButton5.Checked = true;
checkBox1.Checked = true;
}
private
void button1_Click_1(object
sender, EventArgs e)
{
int
katsayi = 100, kdvorani;
float
fiyat;
if
(checkBox1.Checked == true)
{
katsayi -= 20;
}
if
(radioButton5.Checked == true)
{
kdvorani = 20;
}
else
{
kdvorani = 25;
}
if
(radioButton1.Checked == true)
{
fiyat = 2000 * (kdvorani +
katsayi) / 100;
}
else
if (radioButton2.Checked == true)
{
fiyat=1500*(kdvorani+katsayi)/100;
}
else
if (radioButton3.Checked == true)
{
fiyat = 2500 * (kdvorani +
katsayi) / 100;
}
else
{
fiyat=4000*(kdvorani+katsayi)/100;
}
textBox1.Text = fiyat.ToString() + "$";
}
}
}
Hiç yorum yok:
Yorum Gönder