#include <iostream> using namespace std; int main(){ int t,a[4]; for(int i=1;i<=3;i++){ cin>>a[i]; } for(int i=1;i<=2;i++){ for(int j=1;j<=3-i;j++){ if(a[j]<a[j+1]){ t=a[j]; a[j]=a[j+1]; a[j+1]=t; } } } for(int i=1;i<=3;i++){ cout<<a[i]<<' '; } return 0; }
标签:std,int,namespace,冒泡排序,using,main From: https://www.cnblogs.com/w6826301/p/17624467.html