21 Aralık 2013 Cumartesi

C # PROGRAMI İLE ÖRNEK SORULAR-18

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)
        {
            int a = 100;
            float maas, yenimaas;
            maas = Convert.ToSingle(textBox1.Text);
            if (checkBox1.Checked == true)
            {
                a += 10;
            }
            if (checkBox2.Checked == true)
            {
                a += 10;
            }
            if (checkBox3.Checked == true)
            {
                a += 10;
            }
            if (checkBox4.Checked == true)
            {
                a += 10;
            }
            yenimaas = maas * a / 100;
            textBox2.Text = yenimaas.ToString();
        }

       
       
    }

}

Hiç yorum yok: