标签:std 逆置 scanf turn include for nbsp print can
/* 数组的逆置 */ #include <stdio.h> int main() { int i,n,temp; scanf("%d",&n); int a[n]; for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=0;i<n/2;i++){ temp=a[i]; a[i]=a[n-i-1]; a[n-i-1]=temp; } for(i=0;i<n;i++){ printf("%d ",a[i]); } return 0; }
标签:std 逆置 scanf turn include for nbsp print can
原文地址:https://www.cnblogs.com/zhaohuan1996/p/11824201.html