Problem C: 零起点学算法18——3个数比较大小
#include<stdio.h> int main() { int a,b,c; while(scanf("%d %d %d",&a,&b,&c)!=EOF) if(a<b){ int flag=a; a=b; b=flag; } if(a<c){ int flag=a; a=c; c=flag; } if(b<c){ int flag=b; b=c; c=flag; } printf("%d %d %d",a,b,c); return 0; }