你给的题目也太简单了,多打几个字能把你累死?
void Reverse(int a[], int n) {
int i,t;
for(i = 0; i < > > t = a[i];
a[i] = a[n - 1 - i];
a[n - 1 - i] = t;
}
}
int main() {
int i,a[] = {1,2,3,4,7,9,10,12,14,15,16};
int n = sizeof(a)/sizeof(a[0]);
printf("逆置前:\n");
for(i = 0; i < > > printf("%d ",a[i]);
printf("\n");
Reverse(a,n);
printf("逆置后:\n");
for(i = 0; i < > > printf("%d ",a[i]);
printf("\n");
return 0;
}