问答题
运行下面程序,输入10└┘9└┘8└┘7└┘6└┘5└┘4└┘3└┘2└┘1↙写出下面程序执行后的运行结果。
#include
void Sort(int A[],int low,int high)
{
if(low int temp,t=A[low];
int l=low,h=high;
while(l while(A[l] while(A[h]>=t) h--;
if(h>l){
temp=A[l];
A[l]=A[h];
A[h]=temp;
}
}
Sort(A,low,l-1);
Sort(A,l+1,high);
}
}
int main()
{
int A[10];
for (int i=0;i<10;i++)
scanf("%d",&A[i]);
Sort(A,3,8);
for (int i=0;i<10;i++)
printf("%d ",A[i]);
return 0;
}