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