#include int i,j,a[10],n,t;void sort(int n){for(j=0;jfor(i=0;iif(a[i]>a[i+1]){t=a[i];a[i]=a[i+1];a[i+1]=t;}}void main(){printf("请输入十个数:\n");for(i=0;i<10;i++)scanf("%d",&a[i]);printf("请输入你要到第几个数排序:\n");scanf("%d",&n);sort(n);printf("输出排序结果:\n");for(i=0;iprintf("%d ",&a[i]);}