#include<stdio.h>swap(int *p1, int *p2){ int temp; temp = *p1; *p1 = *p2; *p2 = temp;}exchange(int *ep1, int *ep2, int *ep3){ if(*ep1<*ep2) swap(ep1,ep2); if(*ep1<*ep3) swap(ep1,ep3); if(*ep2<*ep3) swap(ep2,ep3);}main(){ int a, b, c; int *pt1, *pt2, *pt3; scanf("%d,%d,%d", &a, &b, &c); pt1 = &a; pt2 = &b; pt3 = &c; exchange(pt1, pt2, pt3); printf("%d
%d
%d
", a, b, c);}
版权声明
本文仅代表作者观点,不代表百度立场。
本文系作者授权百度百家发表,未经许可,不得转载。



