当前位置:网站首页>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;
}
边栏推荐
- STM32 ADC based on Hal library uses DMA multi-channel sampling and solves the problems encountered
- 先爱自己,再爱别人。
- MapReduce (I)
- 不去和谁比较,只需做好自己
- Jinan renshe has signed 1w+ electronic labor contract, which greatly helps HR digitalization
- Redis special data type Geo
- Penetration learning - SQL injection - shooting range - installation and bypass experiment of safety dog (it will be updated later)
- 使用root用户为创建新用户并设置密码
- Accumulation of project problems
- 创建WPF项目
猜你喜欢

安装snownlp包过程出现Requirement already satisfied:及Read timed out.问题解决方法

metaRTC5.0实现君正的纯C的webrtc版IPC

An AI plays 41 games, and the comprehensive performance score of Google's latest multi game decision transformer is twice that of dqn

Practice of online problem feedback module (12): realize image deletion function
![[lvgl layout] grid layout](/img/36/47f586f3dc1a114ed7775c4e190872.png)
[lvgl layout] grid layout
![[lvgl (2)]](/img/f8/d04183cf74896295382765a9dfd88d.png)
[lvgl (2)]

mysql获取自增行标(区别mysql版本)

Esp32 ultra detailed learning record: NTP synchronization time
![[audio decoding chip] Application of vs1503 audio decoding chip](/img/ee/0d5f95fba647592cc95f1e9f410bc9.png)
[audio decoding chip] Application of vs1503 audio decoding chip

Sparksql core usage, 220724,
随机推荐
mysql自动生成创建时间和更新时间
Redis special data type hyperloglog
MySQL gets the self incrementing line mark (different from MySQL version)
济南人社已签1W+电子劳动合同,法大大助力HR数字化
Getting started with redis
找工作备忘
Redis基本类型-有序集合Zset
[jQuery自定义插件] 1 自定义缓存插件-jQueryCache
js和ts学习总结
[media controller] open source project learning notes (based on Arduino micro development board)
[waveform / signal generator] Based on stc1524k32s4 for C on Keil
记录PHPSerializer工具类反序列化遇到的坑
反射
STM32 MP3 music player based on FatFs r0.14b & SD card (also a simple application of FatFs)
2022-07-22 mysql/stonedb并行hashJoin内存占用分析
Camera Hal OEM模块 ---- cmr_grab.c
【学习笔记】Web页面渲染的流程
MySQL automatic generation creation time and update time
[jquery custom plug-in] 1 custom cache plug-in -jquerycache
Don't care too much about others' eyes, it will erase your glory