交换a和b;
#include <iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
{
a=a^b;
b=b^a;
a=a^b;
cout<<a<<" "<<b<<endl;
}
return 0;
}
交换a和b;
#include <iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
{
a=a^b;
b=b^a;
a=a^b;
cout<<a<<" "<<b<<endl;
}
return 0;
}