当前位置:网站首页>Huawei 0 foundation - image sorting
Huawei 0 foundation - image sorting
2022-07-06 18:25:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
Source program :
#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;
}
Execution results :
summary : very easy~0 Base title ~
Copyright notice : This article is an original blog article , Blog , Without consent , Shall not be reproduced .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/117396.html Link to the original text :https://javaforall.cn
边栏推荐
- [sword finger offer] 60 Points of N dice
- Compilation principle - top-down analysis and recursive descent analysis construction (notes)
- 小程序在产业互联网中的作用
- Markdown syntax for document editing (typera)
- IP, subnet mask, gateway, default gateway
- 從交互模型中蒸餾知識!中科大&美團提出VIRT,兼具雙塔模型的效率和交互模型的性能,在文本匹配上實現性能和效率的平衡!...
- 首先看K一个难看的数字
- C language exchanges two numbers through pointers
- bonecp使用数据源
- Coco2017 dataset usage (brief introduction)
猜你喜欢
【中山大学】考研初试复试资料分享
TOP命令详解
78 year old professor Huake has been chasing dreams for 40 years, and the domestic database reaches dreams to sprint for IPO
【.NET CORE】 请求长度过长报错解决方案
UDP协议:因性善而简单,难免碰到“城会玩”
Maixll-Dock 摄像头使用
C language exchanges two numbers through pointers
Alibaba cloud international ECS cannot log in to the pagoda panel console
Why does wechat use SQLite to save chat records?
徐翔妻子应莹回应“股评”:自己写的!
随机推荐
Markdown syntax for document editing (typera)
【.NET CORE】 请求长度过长报错解决方案
d绑定函数
Principle and usage of extern
從交互模型中蒸餾知識!中科大&美團提出VIRT,兼具雙塔模型的效率和交互模型的性能,在文本匹配上實現性能和效率的平衡!...
J'aimerais dire quelques mots de plus sur ce problème de communication...
C语言自动预订飞机票问题
MSF horizontal MSF port forwarding + routing table +socks5+proxychains
Brief description of SQL optimization problems
Compilation principle - top-down analysis and recursive descent analysis construction (notes)
Markdown grammar - better blogging
【Swoole系列2.1】先把Swoole跑起来
Jielizhi obtains the currently used dial information [chapter]
STM32+ENC28J60+UIP协议栈实现WEB服务器示例
Easy to use PDF to SVG program
Transfer data to event object in wechat applet
Ms-tct: INRIA & SBU proposed a multi-scale time transformer for motion detection. The effect is SOTA! Open source! (CVPR2022)...
287. 寻找重复数
CSRF vulnerability analysis
Will openeuler last long