using system;
using system.collections.generic;
using system.linq;
using system.text;
個數是:", j + 1);
num[j] = double.parse(console.readline());
}console.writeline("你剛才輸入的10個數是:");
for (int j = 0; j < 6; j++)
/t", num[j]);
}console.writeline();
double temp;
for (int x = 0; x < 6; x++)}}
console.writeline("經過氣泡排序後的10個數是:");
for (int j = 0; j < 6; j++)
/t", num[j]);
}console.writeline();}}
}
C 氣泡排序
class program endregion region 該方法獲得需要排序的陣列,表呼叫排序方法進行排序 該方法獲得需要排序的陣列,表呼叫排序方法進行排序 public static void sortednumbers 個數字 numbercount for int i 0 i number...
氣泡排序 C
氣泡排序 1 排序方法 將被排序的記錄陣列r 1.n 垂直排列,每個記錄r i 看作是重量為r i key的氣泡。根據輕氣泡不能在重氣泡之下的原則,從下往上掃瞄陣列r 凡掃瞄到違反本原則的輕氣泡,就使其向上 飄浮 如此反覆進行,直到最後任何兩個氣泡都是輕者在上,重者在下為止。1 初始 r 1.n 為...
氣泡排序 C
project 4 1 demonstrate the bubble sort include include using namespace std int main display sorted array cout nsorted array is n for t 0 t size t cou...