/*冒泡法排序*/
#include<iostream.h>
void main()
{
int i,j,t;
int a[10];
for(i=0;i<=10;i++)
{
cin>>a[i];
cout<<"the"<<i<<"is"<<a[i]<<endl;
}
cout<<endl;
for(j=0;j<9;j++)
for(i=0;i<=10-j;i++)
if(a[i]>a[i+1])
{
t=a[i];a[i]=a[i+1];a[i+1]=t;
}
cout<<"the sorted number:"<<endl;
for(i=0;i<10;i++)
cout<<a[i]<<" ";
}