当前位置:网站首页>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边栏推荐
猜你喜欢

【正点原子】IIC的学习与使用(未完...)

Kunlun state screen production (serial 3) - based article (button serial port to send)

VSCode hides the left activity bar

主机和从机配置,建立ssh连接实现Rviz远程控制

三种内核结构---宏内核、微内核、混合内核

QT serial 3: LORA test platform based on QT and STM32H750 (2)

Duplicate keys detected:‘/da…‘

OpenLayers 初学者指南,源码测试可用

VsCode连接远程服务器并修改文件代码

Kunlun State Screen Production (serialization 4) --- Basics (graphical setting and display, button lights)
随机推荐
QT serial 3: LORA test platform based on QT and STM32H750 (2)
Kunlun State Screen Production (Serialization 5) --- Basics (serial port reception, text and light display)
VsCode连接远程服务器并修改文件代码
2021年软考中级过关
Antd 树拖拽一些细节,官网没有,摸坑篇
通过位运算进行字符大小写转换
[Punctuality Atom] Simple application of sys.c, sys.h bit-band operations
ssh 脚本 空格字符转换
MindSpore 提 PR 全流程
TCP为什么要三次握手,握手过程中丢包会怎么样?
[Jiangsu University of Science and Technology Automation Association stm32F103c8t6] Notes [Initial 32 MCU and TIM timing interrupt initialization parameter configuration]
2020-09-03解决pip install安装非常慢[Errno 101] 网络不可达问题
Kunlun On-state Screen Production (serial 1)---Contact
Antd简单启动一个企业级项目
this的指向问题
jvm之方法区
ipconfig命令指南
[Quick MSP430f149] Notes on learning MSP430f149 during the game
华秋第八届硬创大赛携手NVIDIA初创加速计划,赋能企业发展
顺序二叉树---实现数组的二叉树前序遍历输出