#include<stdio.h> int main() { int a,b,c; while(scanf("%d %d %d",&a,&b,&c)!=EOF) { int n; if(b>a) { n=a; a=b; b=n; } if(c>a) { n=a; a=c; c=n; } if(c>b) { n=b; b=c; c=n; } printf("%d %d %d",a,b,c); } return 0; }
#include<stdio.h> int main() { int a,b,c; while(scanf("%d %d %d",&a,&b,&c)!=EOF) { int n; if(b>a) { n=a; a=b; b=n; } if(c>a) { n=a; a=c; c=n; } if(c>b) { n=b; b=c; c=n; } printf("%d %d %d",a,b,c); } return 0; }
转载于:https://www.cnblogs.com/Estwind/p/9727968.html