求帮忙查错
目的是用指针实现两个参数的交换并且实现输入三个数按降序输出
程序代码:#include"iostream.h"
void swap(int *x,int *y);
int main()
{int a,b,c;
cin>>a>>b>>c;
if(a>b)
swap(&a,&b);
if(b>c)
swap(&b,&c);
if(a>c)
swap(&a,&c);
cout<<a<<b<<c;
return 0;
}
void swap(int *x,int *y)
{int temp;
temp=*x,*x=*y,*y=temp;
}




