|  | 
| c# | 
  private void button1_Click(object sender, EventArgs e)
        {
            int a, b;
            a = Convert.ToInt32(textBox1.Text);
            b = Convert.ToInt32(textBox2.Text);
            while (a<=b)
            {
                listBox1.Items.Add(a);
                a = a + 2;
            }
            while (a>=b)
            {
                listBox1.Items.Add(b);
                b = b + 2;
            }
        }  
 
 
0 yorum :
Yorum Gönder