已采纳 王梓澳 中级光能 核心代码如下(有注释): a[n]=m;//插入m for(int i=n;i>=1;i--)//冒泡排序 { for(int j=0;j<i;j++) { if(a[i]<a[j]) swap(a[i],a[j]); } } 注:请勿抄袭