main()
{
int shuzu[5]={1,4,2,8,7};
int i,j;
for(i=0;i
for(j=1;j
if(shuzu[j-1]>shuzu[j])
{
int a=shuzu[j-1];
shuzu[j-1]=shuzu[j];
shuzu[j]=shuzu[j-1];
}
for(i=0;i<5;i++)printf("%d\n",shuzu[i]);
}}
int main()
{
int shuzu[5]={1,4,2,8,7};
int i,j;
for(i=0;i<5;i++)
for(j=1;j<=i;j++)
if(shuzu[j-1]>shuzu[j])
{
int a=shuzu[j-1];
shuzu[j-1]=shuzu[j];
shuzu[j]=a;
}
for(i=0;i<5;i++)printf("%d\n",shuzu[i]);
}