#include<stdio.h> #include<cstdlib> #include<cmath> #include<iostream> #include<algorithm> #include<cstring> using namespace std; typedef long long ll; int main(){ char a[1000],b[1000],c[1000],t[1000]; gets(a); gets(b); gets(c); if(strcmp(a,b)>0){ strcpy(t,a); strcpy(a,b); strcpy(b,t); } if(strcmp(b,c)>0){ strcpy(t,b); strcpy(b,c); strcpy(c,t); } if(strcmp(a,b)>0){ strcpy(t,a); strcpy(a,b); strcpy(b,t); } puts(a); puts(b); puts(c); return 0; } |
Double click to view unformatted code.