C# · 12月 20, 2021

C# — 冒泡排序

C# — 冒泡排序

1. C#代码

int[] num = { 3,5,7,1,2,13,9,4,6,11,22,44,33,14,43,41,868,476,34535,345,46,47,848 }; ( i = ; i i; j– (num[j] < num[j – temp = num[j] = num[j – num[j – ] = Console.WriteLine( ( k = ; k < num.Length; k++ Console.Write(

 2. 运行结果: