#include
void main()
{
int a[10];
int i,j,k;
int temp;
cout<<"please input the total number of the numbers"<
i--;
cout<<"then please input the "< j=0;
while(j<=i)
{
cin>>a[j];
j++;
}
cout<<"the orginal array is ";
for(j=0;j<=i;j++)
{
cout<<" "< }
cout<
{
for(k=j+1;k<=i;k++)
{
if(a[j] {
temp=a[j];
a[j]=a[k];
a[k]=temp;
}
}
}
cout<<"the right sort is :";
for(j=0;j<=i;j++)
{
cout<<" "< }
cout<
谢谢。
没有其他要求的话,做个冒泡排序不就行了。