当前位置:网站首页>Input the names of 10 people and output them in descending order
Input the names of 10 people and output them in descending order
2022-07-24 07:01:00 【Mo xiaodai ^o^】
#include <iostream>
#include <cstring>
#include <cstring>
using namespace std;
int main()
{
int i, j, k,m,n;
string s[10];
cout << " Please enter the names of ten people :" << endl;
for (i = 0; i < 10; i++)
{
cout << " The first " << i + 1 << " The first name is :";
cin >> s[i];
cout << endl;
}
cout << " Sort :" << endl;
for (k = 1; k < 10; k++)
for (m = 0; m < 10 - k; m++)
{
if (s[m] < s[m + 1])
{
string temp;
temp = s[m];
s[m] = s[m + 1];
s[m + 1] = temp;
}
}
for (n = 0; n < 10; n++)
cout << s[n] << endl;
return 0;
}
边栏推荐
- 使用root用户为创建新用户并设置密码
- Redis分布式缓存学习笔记
- 不运动也能增肌???打一针冬眠黑熊的血清就行
- Redis 分片集群
- Love yourself first, then others.
- [lvgl (3)]
- nodejs开启多进程并实现进程间通信
- MGR_ mysqlsh_ Keepalive high availability architecture deployment document
- Can you increase muscle without exercise??? Just get an injection of hibernating black bear serum
- Penetration learning - SQL injection - shooting range - installation and bypass experiment of safety dog (it will be updated later)
猜你喜欢
![[lvgl (1)] a brief introduction to lvgl](/img/2e/2e155f1d3669c27ad1b090ca954224.png)
[lvgl (1)] a brief introduction to lvgl

三级分类/菜单的查询——树形结构

Jinan renshe has signed 1w+ electronic labor contract, which greatly helps HR digitalization

STM32 external interrupt (register version)

Jsonobject is sorted in A-Z order of key

STM32 MP3 music player based on FatFs r0.14b & SD card (also a simple application of FatFs)
![[lvgl layout] grid layout](/img/36/47f586f3dc1a114ed7775c4e190872.png)
[lvgl layout] grid layout

Requirements already satisfied: and read timed out. problem solving methods appear during the installation of snownlp package

"Big factory interview" JVM Chapter 21 questions and answers

【学习笔记】Web页面渲染的流程
随机推荐
MapReduce(一)
永远不要迷失自我!
找工作备忘
lambda表达式对list对象进行多字段排序
Neural network superparameter adjustment (based on ray package)
不要太在意别人对你的看法
Getting started with redis
Redis分布式缓存学习笔记
济南人社已签1W+电子劳动合同,法大大助力HR数字化
【学习笔记】网页出现白屏可能的原因与优化方法
上传图片base64
oss授权单个bucket权限
别太在意别人的眼光,那会抹杀你的光彩
STM32 MP3 music player based on FatFs r0.14b & SD card (also a simple application of FatFs)
Redis特殊数据类型-BitMap
Lambda expressions sort list objects in multiple fields
Jinan renshe has signed 1w+ electronic labor contract, which greatly helps HR digitalization
[lvgl (4)] event and event bubble of the object
Redis special data type hyperloglog
OWASP TOP10 penetration test