İKİ SAYI DAHİL ARASINDAKİ SAYILARI YAZDIRAN PROGRAM


        (2 LABEL, 2 TEXTBOX, LISTBOX ve BUTTON kullanıldı.)


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 iki_sayi_arasindaki_sayilar

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }


        private void button1_Click(object sender, EventArgs e)

        {

            int n1 = Convert.ToInt32(textBox1.Text);

            int n2 = Convert.ToInt32(textBox2.Text);

            for (int i = n1; i <= n2; i++)

            {

                listBox1.Items.Add(i);

            }

        }

    }

}


...
 








Yorumlar

Popüler Yayınlar