华为0基金会——图片整理

源程序:

#include<iostream>
#include<string>
using namespace std;

//const int max=1024;

int main()
{
	char s[1024];
	char temp;
	gets(s);
	int len;
	len=strlen(s);
	for(int i=0;i<len;i++)
	{
		for(int j=i+1;j<len;j++)
		{
			if(s[i]>s[j])
			{
				temp=s[i];s[i]=s[j];s[j]=temp;
			}			
		}
	}
	puts(s);
	return 0;
}

执行结果:


总结:非常easy~0基地称号~

版权声明:本文博客原创文章,博客,未经同意,不得转载。

posted @ 2015-07-28 14:28  yxwkaifa  阅读(213)  评论(0编辑  收藏  举报