摘要: #include <stdio.h>void insertOrder(int* p, int len);int input(int* array){ int n; int i = 0; while(1) { scanf("%d", &n); if(n == -1) break; *array = n; array++; i++; } return i;}int main(){ ... 阅读全文
posted @ 2013-03-12 20:14 通杀 阅读(116) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>int input(int* array);int selectMinKey(int* p, int i, int len);void selectOrder(int *p, int len);int input(int* array){ int n; int i = 0; while(1) { scanf("%d", &n); if(n == -1) break; *array = n; arra... 阅读全文
posted @ 2013-03-12 16:03 通杀 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>int partition(int* p, int low, int high);void Qsort(int* p, int low, int high);void quickOrder(int* p, int len);int main(){ int array[10]; int len; len = input(array); quickOrder(array, len); for(int i =0; array[i] != '\0'; i++) { p... 阅读全文
posted @ 2013-03-12 15:44 通杀 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>void input(int* array);void order(int* p); int main(){ int array[10]; input(array); order(array); for(int i =0; array[i] != '\0'; i++) { printf("number is:%d\r\n", array[i]); } return 0;}void input(int* array){ in... 阅读全文
posted @ 2013-03-12 12:22 通杀 阅读(142) 评论(0) 推荐(0) 编辑