当前位置:网站首页>c语言编程练习
c语言编程练习
2022-07-30 05:46:00 【缘聚654】
数字排序
#include<stdio.h>
int main()
{
int i,j,t,a[10];
printf("请输入十个数:");
for(j=0;j<10;j++)
scanf("%d",&a[j]);
printf("\n");
for(i=0;i<9;i++)
for(j=i+1;j<10;j++)
if(a[i]>a[j])
{ t=a[i];a[i]=a[j];a[j]=t;}
printf("排序之后:");
for(j=0;j<10;j++)
printf("%4d",a[j]);
}
输入十个数:614 496 653 563 554 656 133 563 356 563
请输入十个数:614
496
653
563
554
656
133
563
356
563
排序之后: 133 356 496 554 563 563 563 614 653 656边栏推荐
- Diwen serial screen production (serialization 1) ===== preparation work
- PCB 一分钟科普之你真的懂多层板吗?
- 昆仑通态屏幕制作(连载1)---接触篇
- [Jiangsu University Self-Chemistry Association stm32F103c8t6] Notes [Entry 32 MCU and GPIO initialization parameter configuration]
- >>> /deep/ ::v-deep 深度作用选择器
- Three working modes of CPU: real mode, protected mode, long mode
- 快速排序学习记录
- 主机和从机配置,建立ssh连接实现Rviz远程控制
- xftp的简单使用
- openssl1.1.1ARM dual compilation
猜你喜欢

二进制到汇编:进制,原码反码补码,位运算,通用寄存器,内存一套打通

高交会重要活动之一|2020中国硬件创新大赛全国总决赛

FPGA parsing B code----serial 1

无法完成包的安装npm ERR! Refusing to install package with name “moment“ under a package also called “moment“

FPGA parsing B code----serial 2

QT serialization 1: readyRead() function, the solution to incomplete data subcontracting
![[Punctuality Atom] Learning and use of IIC (unfinished...)](/img/b7/325cad848eacee67c56c6cad321bd0.png)
[Punctuality Atom] Learning and use of IIC (unfinished...)

【markdown常用用法】

TCP建立连接的过程

【已解决:el-input标签无法输入或不显示文字】
随机推荐
QT weekly skills (3)~~~~~~~~~ serial port addition
2020-09-03解决pip install安装非常慢[Errno 101] 网络不可达问题
基于QT的CAN通讯数据实时波形显示(连载八)====“子函数或新类调用ui控件”
爬2.12.6的Antd上传图片坑
(*(void (*)())0)()的解读
this的指向问题
自定义类加载器
写在公众号之前——QT,ARM,DSP,单片机,电力电子与传动!
重磅揭晓!第十四届深创赛福田预选赛区暨华秋第八届硬创大赛华南分赛区晋
【正点原子】sys.c、sys.h位带操作的简单应用
华秋第八届硬创赛与安创加速器达成战略合作,助力硬科技项目成长
The most complete difference between sizeof and strlen, as well as pointer and array operation analysis
【已解决:el-input标签无法输入或不显示文字】
[Jiangsu University Self-Chemistry Association stm32F103c8t6] Notes [Introduction to 32 MCUs and Using TIM Output to Compare and Configure PWM]
Knowledge of the day: handwritten deep copy and shallow copy (solves the problem of circular references)
[Jiangsu University of Science and Technology Automation Association stm32F103c8t6] Notes [Initial 32 MCU and TIM timing interrupt initialization parameter configuration]
闭包和作用域(你不知道的JS自用笔记)
[Punctuality Atom] Simple application of sys.c, sys.h bit-band operations
三种内核结构---宏内核、微内核、混合内核
QT serialization 1: readyRead() function, the solution to incomplete data subcontracting