1 #include<iostream> 2 using namespace std; 3 int a=0; int b=0; 4 void exchange(){ 5 int p; 6 if(a<b){ 7 8 p=a; 9 a=b; 10 b=p; 11 12 } 13 } 14 15 int main(){ 16 cin>>a>>b; 17 exchange(); 18 cout<<a<<""<<b<<endl; 19 return 0; 20 21 22 23 }
时间: 2024-11-02 17:30:34