冒泡排序
int []array=new int [5]{5,3,1,9,7};
for (int i = 0; i < array.Length; i++)
{
for (int j = i+1; j < array.Length; j++)
{
if (array[j] < array[i])
{
int a = array[i];
array[i]=array[j];
array[j]=a;
}
}
}
foreach(int n in array)
{
Console.WriteLine(n);
}
Console.ReadLine();