反转输出是比如a[5]={0,1,2,3,4}输出是a[5]={4,3,2,1,0}吗?如果是我理解的这样,那看下面吧 include <stdio.h>int main(){int a[6]={0,1,2,3,4,5};int i,n,temp;n=6;//数组元素个数for(i=0;i<n/2;i++){temp=a[i];a[i]=a[n-1-i];a[n-1-i]=temp;}...
include <stdio.h>int hanshu(int i,int a[]){ int temp,counter=i; for(i=0;i<counter/2;i++) { temp=a[i]; a[i]=a[counter-i]; a[counter-i]=temp; }}int main(){ int a[10],i=10; for(i=0;i<10;i++)//<=== scanf("%d",&a...