#include <iostream>
#include <string>
using namespace std;
int main()
{
string sort[10]= {};
int i,j;
string t;
for(i=0; i<10; i++)
{
cin>>sort[i];
}
cout<<endl;
for(i=0; i<10; i++)
for(j=0;j<10-i;j++)
{
if(sort[j]>sort[j+1])
{
t=sort[j];
sort[j]=sort[j+1];
sort[j+1]=t;
}
}
for(i=0;i<10;i++)
{
cout<<sort[i]<<endl;
}
return 0;
}
运行结果: