📄 a.c
字号:
/* A program to test
*/
int x[10];
int minloc(int a[],int low,int high)
{
int i;int x;
int k;
k=low;
x=a[low];
i=low+1;
while(i<high)
{
if(a[i]<high)
{x=a[i];
k=i;}
i=i+1;
}
return k;
}
void sort(int a[],int low,int high)
{
int i;
int k;
i=low;
while(i<high-1)
{
int t;
k=minloc(a,i,high);
t=a[k];
a[k]=a[i];
a[i]=t;
i=i+1;
}
}
void mian(void)
{
int i;
i=0;
while(i<10)
{
x[i]=input();
i=i+1;
}
sort(x,0,10);
i=0;
while(i<10)
{
output(x[i]);
i=i+1;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -