摘要: View Code 1 #include <iostream> 2 #include <cassert> 3 #include <cmath> 4 using namespace std; 5 6 //数组反转 7 void reverse(int *a,int aLength) 8 { 9 assert(a);10 int i=0;11 int j=aLength-1;12 while(i<j && i<aLength && j>0)13 {14 swap(a[i],a[j]);15 i++;16 j... 阅读全文
posted @ 2012-07-14 16:39 kasuosuo 阅读(564) 评论(0) 推荐(0) 编辑