当前位置:网站首页>C language: selective sorting method
C language: selective sorting method
2022-07-24 04:29:00 【Nianchi ichthyology programming】
#include <stdio.h>
int main()
{
int a[10] , i , j;
printf(" Please enter 10 Number :");
for(i = 0 ; i < 10 ; i++){
scanf("%d",&a[i]);
}
printf("\n=========== Before ordering ============\n");
for(i = 0 ; i < 10 ; i++){
printf("%5d",a[i]);
}
for(i = 0 ; i < 9 ; i++){
for(j = i+1 ; j < 10 ; j++){
if(a[i] > a[j]){
int t = a[i];
a[i] = a[j];
a[j] = t;
}
}
}
printf("\n=========== After ordering ============\n");
for(i = 0 ; i < 10 ; i++){
printf("%5d",a[i]);
}
return 0;
}
边栏推荐
- buu web
- In the business interaction and foreign service of.Gz, we integrate multiple models
- Analyze the real-time development method of Bank of London
- C语言经典习题之猴子吃桃问题
- Billiard simulator based on the integration of GL pipeline and ray tracing technology
- LAN SDN hard core technology insider 21 Kang long regrets -- Specifications and restrictions (middle)
- Up sampling method (deconvolution, interpolation, anti pooling)
- Baidu search cracking down on pirated websites: why Internet content infringement continues despite repeated prohibitions
- J9 number theory: what is Web3.0? What are the characteristics of Web3.0?
- Redis sentinel mode, master node check script
猜你喜欢

Jinglianwen technology provides 3D point cloud image annotation service

Qt5.14_MinGW/MSVC下实现VS2019面板自由拖拽组合功能

buu web

What new opportunities exist in the short video local life section?

一次 svchost.exe 进程占用大量网络带宽的排查

Can NFT pledge in addition to trading?

Collection of test case design methods
【望解答】数据无法正确同步了

64 attention mechanism 10 chapters
[hope to answer] the data cannot be synchronized correctly
随机推荐
在一线城市上班的程序员,家庭一般是怎样的?
buu web
Privacy protection federal learning framework supporting most irregular users
Iqoo 10 series attacks originos original system to enhance mobile phone experience
LAN SDN technology hard core insider 9 from software overlay to hardware overlay
MOS cameraization and digitization "includes designation (contro. skilled
Alibaba Taobao Department interview question: how does redis realize inventory deduction and prevent oversold?
Live broadcast preview | practice sharing of opengauss' autonomous operation and maintenance platform dbmind
What is the real HTAP? (2) Challenge article
Nautilus 3.19.2为Gnome增添动力
微波技术基础实验二 功分器与定向耦合器设计
[2023 core technology approval test questions in advance] ~ questions and reference answers
Once svchost Troubleshooting of exe process occupying a large amount of network bandwidth
PMIX ERROR: ERROR in file gds_ds12_lock_pthread.c
Determined by hardware (see official 2 and
.gz的业务交互和对外服篇中我们通合多个模型
如何用STATA进行chowtest
The C host is always set separately for IIC. If enough, the next few bits can be set
How to change the direction of this gracefully
别人发的word中的参考文献是{}这样的乱码格式怎么办