摘要:
//冒泡排序:相邻俩个数进行比较,每进行一趟最大值或最小值都在最右边 所以进行的总趟数是数组大小-1 #include<stdio.h>#include<time.h>int main(void){ int i, j, b; int a[5] = { NULL }; srand(time(NULL) 阅读全文
posted @ 2020-06-04 20:50
sea,horse
阅读(78)
评论(0)
推荐(0)
摘要:
选择排序:是默认为a[0]为最大值或最小值 #include<stdio.h>#include<time.h>int main(void){ int i,j, b; int a[5] = { NULL }; srand(time(NULL));//产生随机数种子 for (i = 0; i < 5; 阅读全文
posted @ 2020-06-04 15:42
sea,horse
阅读(46)
评论(0)
推荐(0)

浙公网安备 33010602011771号