#include <stdio.h> #include <math.h> int main(){ char a[1000],b[1000],c[1000],t[1000]; gets(a); gets(b); gets(c); if(strcmp(a,b)>0){ strcpy(t,b); strcpy(b,a); strcpy(a,t); } if(strcmp(a,c)>0){ strcpy(t,c); strcpy(c,a); strcpy(a,t); } if(strcmp(b,c)>0){ strcpy(t,b); strcpy(b,c); strcpy(c,t); } puts(a); puts(b); puts(c); return 0; } |
Double click to view unformatted code.