提交时间:2024-09-21 23:36:24

运行 ID: 51486

#include<bits/stdc++.h> using namespace std; int main(){ int c[6]; for(int i=0;i<6;i++){ cin>>c[i]; } for(int i=0;i<5;i++){ if(c[i]>c[i+1]){ swap(c[i],c[i+1]); } } for(int i=0;i<6;i++){ cout<<c[i]<<" "; } return 0; }