摘要: #include #include #include #include using namespace std; void bubsort(int *a){ for(int i=1;ia[j+1]) swap(a[j+1],a[j]); } } return ; } int main(){ int a[6]={0,9,5,1,3,7}; bubsort(a); for(... 阅读全文
posted @ 2018-04-25 14:56 松手丶明晃晃 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; void Choicesort(int *a){ for(int i=1;ia[j]) swap(a[i],a[j]); } } return ; } int main(){ int a[6]={0,4,5,1,3,7}; Choicesort(a); fo... 阅读全文
posted @ 2018-04-25 14:54 松手丶明晃晃 阅读(99) 评论(0) 推荐(0) 编辑