📄 数字排序.cpp
字号:
#include<stdio.h>
void main()
{
int num[10],i,m,n,temp,con;
printf("Enter the number:");
scanf("%d",&con);
for (i=0;i<con;i++)
{
printf("Enter the number %d: ",i+1);
scanf("%d",&num[i]);
}
for(m=0;m<con;m++)
{
for(n=m+1;n<con;n++)
if(num[n]>num[m])
{
temp=num[m];
num[m]=num[n];
num[n]=temp;
}
}
for(i=0;i<con;i++)
printf("the order of the number is %d: %d\n",i+1,num[i]);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -