#include<iostream>
#include<string>
using namespace std;
int main()
{
int n,m;
string a,country[10];
for(n=0; n<10; ++n)
{
cin>>country[n];
}
for(m=0; m<9; ++m)
{
for(n=0; n<5; ++n)
{
if(country[n]>country[n+1])
{
a=country[n];
country[n]=country[n+1];
country[n+1]=a;
}
}
}
for(n=0; n<10; ++n)
{
cout<<country[n]<<endl;
}
return 0;
}
按地名字符,给地名排序。
最新推荐文章于 2022-11-06 18:22:57 发布