摘要:
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... 阅读全文