这是我自己写的,在VC6.0下通过了,你看看吧:
typedef DataType int;
void swap(DataType &x,DataType &y)
{
DataType temp;
temp=x;x=y;y=temp;
}
void reverser_order(DataType a[],int n)
{
int i=0;
int j=n-1;
while(i<=j)
{
swap(a[i],a[j]);
i++;
j--;
}
}
追问哦,谢谢,不需要写代码,只要写函数就可以了,不知道函数怎么写
本回答被提问者采纳