当前位置:网站首页>华为0基金会——图片整理

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

2022-07-06 10:19:00 全栈程序员站长

大家好,又见面了,我是全栈君。

源程序:

#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基地称号~

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

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/117396.html原文链接:https://javaforall.cn

原网站

版权声明
本文为[全栈程序员站长]所创,转载请带上原文链接,感谢
https://cloud.tencent.com/developer/article/2041457

随机推荐