Visual Studio C# �rnekleri � Araba Park �creti Hesaplama

Visual Studio C# �rnekleri � Araba Park �creti Hesaplama

Visual Studio C# �rneklerimize araba park �creti hesaplama program� ile devam ediyoruz, bir park yerinde otomobil i�in saat 5, g�n 30, kamyon-kamyonet i�in saat 7, g�n 80 �eklinde �cretlendirme yap�lmas� isteniyor, program i�in ilk olarak a�a��daki form tasar�m�n� yap�yor ve kodlar�m�z� yaz�yoruz..


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
private void button1_Click(object sender, EventArgs e)
{
    int saat = 0, gun = 0,ucret=0;
    string[] dizi=new string[30];
    string[] dizi1 = new string[30];
    dizi = comboBox2.Text.Split(' ');
    gun = Int16.Parse(dizi[0]);
    dizi1 = comboBox1.Text.Split(' ');
    saat = Int16.Parse(dizi1[0]);
    if (radioButton1.Checked)
    {
        ucret = gun * 30 + saat * 5;
    }
    if (radioButton2.Checked)
    {
        ucret = gun * 80 + saat * 7;
    }
    label3.Text = ucret.ToString();
   
}
private void Form1_Load(object sender, EventArgs e)
{
    for (int i = 1; i <= 23; i++)
    {
        comboBox1.Items.Add(i+" Saat");
    for (int i = 0; i <= 30; i++)
    {
        comboBox2.Items.Add(i + " G�n");
    
  
}

Yorum Gönder

Recent Posts

https://www.rentacarantalya.net/
 
DeL��� : Film izle
Copyright © 2012 - 2013. DenemeTv

Tasar�m: G�ncel Bilgi