回复2楼:
我把这些错误改了,还是运行不了,显示在第7行错误,还望指导!😂
#include <stdio.h>
int main ()
{
void inv(int arr[],int n);
int i,arr[i];
printf ("you want to change the numbers");
for (i=0,i<10,i++)//此处显示错误!
{
scanf ("%d",&arr[i]);
printf ("%d",arr[i]);
}
inv (arr[i],10);
printf ("the new orders");
for (i=0,i<10,i++)
printf ("%d",arr[i]);
return 0;
}
void inv(int arr[],int n)
{
int temp,i,j,a;
a=(n-1)/2;
i=0;
for (i=0,i<=a,i++)
{
j=n-1-i;
temp=arr[i];arr[i]=arr[j];arr[j]=temp;
}
return;
}
[此贴子已经被作者于2018-10-5 10:36编辑过]