当前位置:网站首页>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
边栏推荐
- 第三季百度网盘AI大赛盛夏来袭,寻找热爱AI的你!
- Open source and safe "song of ice and fire"
- 面向程序员的精品开源字体
- Jielizhi obtains the customized background information corresponding to the specified dial [chapter]
- Maixll-Dock 摄像头使用
- Interview shock 62: what are the precautions for group by?
- Introduction and case analysis of Prophet model
- 2022 Summer Project Training (I)
- Will openeuler last long
- 简单易用的PDF转SVG程序
猜你喜欢

Implementation of queue

The third season of Baidu online AI competition is coming in midsummer, looking for you who love AI!

Compilation principle - top-down analysis and recursive descent analysis construction (notes)

Virtual machine VirtualBox and vagrant installation

關於這次通信故障,我想多說幾句…

简单易用的PDF转SVG程序

第三季百度网盘AI大赛盛夏来袭,寻找热爱AI的你!

使用cpolar建立一个商业网站(1)

44所高校入选!分布式智能计算项目名单公示

Easy to use PDF to SVG program
随机推荐
STM32 key state machine 2 - state simplification and long press function addition
STM32+ESP8266+MQTT协议连接OneNet物联网平台
[swoole series 2.1] run the swoole first
Take you through ancient Rome, the meta universe bus is coming # Invisible Cities
UDP协议:因性善而简单,难免碰到“城会玩”
SQL优化问题的简述
[.Net core] solution to error reporting due to too long request length
Why does wechat use SQLite to save chat records?
Excellent open source fonts for programmers
徐翔妻子应莹回应“股评”:自己写的!
Common - magic number 7
Introduction and case analysis of Prophet model
POJ 2208 已知边四面体六个长度,计算体积
1700C - Helping the Nature
Recursive way
Docker安装Redis
Reproduce ThinkPHP 2 X Arbitrary Code Execution Vulnerability
2022/02/12
Jielizhi obtains the customized background information corresponding to the specified dial [chapter]
2022 Summer Project Training (III)