摘要: 1 #include 2 #include 3 void BubbleSort(int *a,int n); 4 5 int main(void)//入口函数,整型,无参数 6 { 7 int k; 8 int a[10]={2,4,6,8,0,1,3,5,7,9}; 9 ... 阅读全文
posted @ 2015-09-10 10:22 haxnt 阅读(247) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 4 void swap(int x,int y); 5 void swap_p(int *px,int *py); 6 #define swap_m(x,y,t) ((t)=(x),(x=(y),(y)=(t)))//宏函数 7 int main(... 阅读全文
posted @ 2015-09-10 10:19 haxnt 阅读(905) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 void SelectSort(int *a,int n);//预声明要调用的函数 4 int main(void) 5 { 6 int k; 7 int x[10]={2,4,6,8,0,1,3,5,7,9}; 8 for... 阅读全文
posted @ 2015-09-10 01:23 haxnt 阅读(279) 评论(0) 推荐(0)