using System;
using System.Collections.Generic;
using System.Text;
namespace maopao
{
class Program
{
static void Main(string[] args)
{
double[] a = new double[11];
Console.WriteLine("请输入10个数");
for (int i = 1; i < 11; i++)
{
Console.WriteLine("请输入第[{0}]数:", i);
a[i] = Console.ReadLine();//是个简单的冒泡排序,但是运行到这里的时候,读如第一个数,
Console.WriteLine("请输入第[{0}]数:", i);会循环3次,再运行read这句
}
for(int k=1;k<=11;k++)
for (int m = 0; m < 11; m++)
{
if (a[m] > a[m + 1])
{
double temp = a[m];
a[m] = a[m + 1];
a[m + 1] = temp;
}
foreach (double num in a)
Console.Write("{0}/t", num);
}
}
}
}
谁帮我看看,谢谢!!!