删除 排序/maopaopaixu.cpp

准备 重新 上传
This commit is contained in:
2026-02-07 02:56:38 -05:00
parent fd6a8c165b
commit a5c40a07eb

View File

@@ -1,36 +0,0 @@
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int n=5,max;
bool bl=false;
int a[n]={12,22,81,94,95};
for(int i=0;i<n;i++){
for(int j=0;j<n-i-1;j++){
if(a[j]>a[j+1]){
max=a[j];
a[j]= a[j+1];
a[j+1]=max;
bl=true;
}
if (!bl)
break;
}
}
for(int j=0;j<n;j++)
cout<<a[j]<<" ";
cout<<endl;
return 0;
}