A C # version of the bubbling ordering method

xiaoxiao2021-03-06  71

From small to large, int [] myarray = new int [] {10, 8, 3, 5, 6, 7, 4, 6, 9}; // Take the length of the longest-length phrase - bubbling method for (Int J = 1; j myarray [i 1], MyArray [i] up one IF (MyArray [i]> MyArray [i 1]) {int Temp = MyArray [i]; myarray [i] = myArray [i 1]; MyArray [i 1] = Temp }}} From large to small sorting int [] myarray = new int =} {10, 8, 3, 5, 6, 7, 4, 6, 9}; // Take the length of the longest length - bubbling FOR (int J = 1; j

转载请注明原文地址:https://www.9cbs.com/read-109623.html

New Post(0)