标签:
方式一:
1 public static void Sort(int[] array) 2 { 3 for (int i = 0; i < array.Count(); i++) 4 { 5 for (int j = i+1; j < array.Count(); j++) 6 { 7 if (array[i]>array[j]) 8 { 9 int temp = array[i]; 10 array[i] = array[j]; 11 array[j] = temp; 12 } 13 } 14 } 15 16 foreach (var item in array) 17 { 18 Console.WriteLine(item); 19 } 20 }
标签:
原文地址:http://www.cnblogs.com/q975261413/p/5275229.html