Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C# by beh ( 10 years ago )
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Hesap
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void Form1_Load_1(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            

            if (textBox1.Text == "" || textBox2.Text == "")
            {
                MessageBox.Show("Sayı Giriniz");
            }
            else
            {


                if (Convert.ToInt32(textBox1.Text) < Convert.ToInt32(textBox2.Text))
                {


                    if (radioButton1.Checked == true || radioButton2.Checked == true || radioButton3.Checked == true)
                    {
                        {

                            for (int i = Convert.ToInt32(textBox1.Text); i <= Convert.ToInt32(textBox2.Text); i++)
                            {
                                if (radioButton3.Checked == true)
                                {

                                    if (i % Convert.ToInt32(textBox3.Text) == 0)
                                    {
                                        label3.Text = Convert.ToString(i);

                                    }

                                    else
                                    {
                                        MessageBox.Show(Convert.ToInt32(textBox3.Text) + " ile Bölünen Sayılar İçin Tıklayın");
                                    }


                                }
                                if (radioButton1.Checked)
                                {
                                    if (i % 2 == 1)
                                    {
                                        label3.Text = Convert.ToString(i);

                                    }
                                    else
                                    {
                                        MessageBox.Show("Tek Sayılar İçin Tıklayın");

                                    }
                                }

                                if (radioButton2.Checked)
                                {

                                    if (i % 2 == 0)
                                    {
                                        label3.Text = Convert.ToString(i);

                                    }
                                    else
                                    {
                                        MessageBox.Show("Çift Sayılar İçin Tıklayın");

                                    }

                                }
                            }

                        }
                    }
                    else
                    {
                        MessageBox.Show("Kriter Seçiniz");
                    }

                }
                else
                {
                    MessageBox.Show("1. Sayı , 2. Sayıdan küçük olmalıdır");
                }

            }

        }

    }
}

 

Revise this Paste

Your Name: Code Language: