int [] szA={35,24,414,315,93,91,12,13,149,15,984,222,451,241,55}; for (int m = 0; m < szA.Length-1; m++) { for (int n = 0; n <szA.Length-1 ; n++) { if (szA[n] < szA[n+ 1]) { int t = szA[n]; szA[n] = szA[n + 1]; szA[n + 1] = t; } } } foreach(int i in szA) Console.WriteLine(i+" "); Console.ReadLine();
时间: 2024-10-26 11:14:16