不用swap、move等,也不用第三个变量,仅用加减法交换两int变量的值

a=a+b;

b=a-b;

a=a-b;

posted on 2021-03-01 17:46  gxlt~~  阅读(36)  评论(0)    收藏  举报