#include <stdio.h>
#define N 10
void reverse(int *b) //逆序排列函数
{
int i, t;
for(i = 0; i <= N/2 - 1; i++)
{
t = b[i];
b[i] = b[N-1-i];
b[N-1-i] = t;
}
}
int main()
{
int i;
int a[N] = {9,8,7,4,5,1,2,0,3,6};
reverse(a);
for(i = 0; i < N; i++)
{
printf("%d ",a[i]);
}
printf("\n");
return 0;
}
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/4034970a304e251fb6205c0aa086c9177e3e5368?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)