比较三个数,输出三个数的大小排序

#include<stdio.h>

int main()
{void swop(int x,int y);
int a,b,c;
scanf("%d,%d,%d",&a,&b,&c);
swop(a,b);
swop(a,c);
swop(b,c);
printf("\n");
printf("%d %d %d",a,b,c);
return 0;
}
void swop(int x,int y)
{
int t;
if(x>y)
{t=x;x=y;y=t;}
}求修改

#include<stdio.h>

int main() {
    void swop(int &x, int &y);
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    swop(a, b);
    swop(a, c);
    swop(b, c);
    printf("\n");
    printf("%d %d %d", a, b, c);
    return 0;
}
void swop(int &x, int &y) {
    int t;
    if(x > y) {
        t = x;
        x = y;
        y = t;
    }
}