不依赖第三个变量,实现两个整数交换 //方法一(位运算) int a, b; a = a ^ b; b = a ^ b; a = a ^ b; //方法二(加法) int a, b; a = a + b; b = a - b; a = a - b;