不懂错误在哪,找不出啊。。。
#include <iostream>using namespace std;
int main ()
{
void sort(int x, int y, int z);
int a,b,c;
cin>>a>>b>>c;
sort(a,b,c);
return 0;
}
void sort(int x,int y,int z);
{
int temp;
if(x>y) {temp=x;x=y;y=temp;}
if(z<y) cout<<z<<","<<x<<","<<y<<endl;
else if (z<y) cout<<x<<","<<z<<","<<y<<endl;
else cout<<z<<","<<x<<","<<y<<endl;
}