/*shuanggege*/
#include <stdio.h>
int main()
{
int i=0,j=0,nuber,temp,arry[100000];
printf("plase cin -1 over\n");
while(1)
{
nuber=0;
scanf("%d",&arry[i]);
nuber++;
if(arry[i]==-1)
{
break;
}
}
for (i = 0; i < nuber; i++)
{
for(j=0;j<nuber-i;j++)
{
if(arry[j]>arry[j+1])
{
temp=arry[j];
arry[j]=arry[j+1];
arry[j+1]=temp;
}
}
}
for (i = 0; i < nuber; i++)
{
printf("%d ",arry[i]);
}
getchar();
return 0;
}
#include <stdio.h>
int main()
{
int i=0,j=0,nuber,temp,arry[100000];
printf("plase cin -1 over\n");
while(1)
{
nuber=0;
scanf("%d",&arry[i]);
nuber++;
if(arry[i]==-1)
{
break;
}
}
for (i = 0; i < nuber; i++)
{
for(j=0;j<nuber-i;j++)
{
if(arry[j]>arry[j+1])
{
temp=arry[j];
arry[j]=arry[j+1];
arry[j+1]=temp;
}
}
}
for (i = 0; i < nuber; i++)
{
printf("%d ",arry[i]);
}
getchar();
return 0;
}