![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-56/ti_inject-812ce.png)
设计一个简单的Windows程序,输入5个数字,然后排序并输出,运行效果如下图: Untitled.jpg 核心代码提示: double[] a = new double[5]; int i = 0; private void button1_Click(object sender, EventArgs e) { double element = double.Parse(textBox1.Text); a[i] = element; textBox2.Text += a[i] + " "; i++; label2.Text = "输入第" + (i + 1) + "个元素"; } private void button2_Click(object sender, EventArgs e) { Array.Sort(a); textBox3.Text = a[0] + " " + a[1] + " " + a[2] + " " + a[3] + " " + a[4]; }