方法1:
int a = 3, b = 5;
a = a + b;
b = a - b;
a = a - b;
方法2:
int a = 3, b = 5;
a = a - b;
b = a + b;
a = b - a;
方法3:
int a = 3, b = 5;
a = a * b;
b = a / b;
a = a / b;
方法4:
float a = 3.0, b = 5.0;
a = a / b;
b = a * b;
a = b / a;
方法5:
(异或法:相同为0,相异为1)
int a = 3, b = 5;
a = a ^ b;
b = a ^ b;
a = a ^ b;