摘要: /**算法:选择排序1,从当前未排序的正数中找一个最小的整数,将它放在已排序的整数列表的最后2.要点:选择排序选最小的,往左边选*/ #include <stdio.h>void SelectionBort(int *a,int n);int main(){ int k; int a[10]={2, 阅读全文
posted @ 2016-08-23 17:58 caocx 阅读(203) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>void BubbleSort(int *a,int n);int main(void){ int arr[10] = {2,4,6,8,0,1,3,5,7,9}; int k; for(k=0;k<10;k++){ if(k==9) printf("%d\n", 阅读全文
posted @ 2016-08-23 11:06 caocx 阅读(190) 评论(0) 推荐(0) 编辑