#include<bits/stdc++.h>
using namespace std;
void swap(int &x,int &y){
int temp;
temp = x;
x = y;
y =temp;
cout << x << " " << y <<endl;
}
int main( ){
int a = 10 , b = 50;
swap(a,b);
cout << a << " " << b << endl;
return 0;
}
用“&”则传地址