共同学习,共同进步!
when i want to ask anyone,i will ask myself first.
[此贴子已经被作者于2006-2-15 10:01:05编辑过]
main()
{
int a[10];
int i,j,temp;
printf("Please Enter 10 Numbers:\n");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
printf("\n");
for(j=0;j<10;j++)
for(i=0;i<10;i++)
if(a[i]>a[i+1])
{
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
printf("The Sorted Numbers Is: \n");
for(i=0;i<10;i++)
printf("%d",a[i]);
}