题目描述
输入两人的姓名进行比较,按从小到大的顺序输出。(姓名为连续字符串,没有空格)
输入
输入两行,为两个英文单词或中文拼音的字符串。
输出
输出两行,将这两个字符串按从小到大的顺序输出。
样例
输入
mouse elephant
输出
elephant mouse
#include <bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
if(sizeof(a)<=sizeof(b))
{
cout<<b<<endl;
cout<<a;
}
else
{
cout<<a<<endl;
cout<<b;
}
return 0;
}