#include<iostream>
using namespace std;//必须得加上
int main()
{
int x,y,temp;
cout<<"Please input 2 numbers:";
cin>>x>>y;
if(x<y)
/*{
temp=x;
x=y;
y=temp;
}*/
{
x+=y;
y=x-y;
x-=y;
}
cout<<"x="<<x;
cout<<"y="<<y;
return 0;
}
Please input 2 numbers:45 68
x=68y=45
--------------------------------
Process exited after 2.477 seconds with return value 0
请按任意键继续. . .