您的位置:首页 > 其它

第12题

2015-04-07 17:45 120 查看
#include<iostream>
#include"string"
using namespace std;
int main()
{
string str[5],temp;
for(int a=0;a<5;a++)
{
cin>>str[a];
}
for(int i=0;i<4;i++)
for(int j=0;j<4-i;j++)
if(str[j]>str[j+1])
{    temp=str[j];    str[j]=str[j+1];    str[j+1]=temp;   }
for(int a=0;a<5;a++)
cout<<str[a]<<' ';
return 0;
}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: