用异或交换两个数的值

void swap(int a,int b)

{
    a=a^b;

  b=b^a;

a=a^b;

}

posted @ 2013-04-15 13:43  it_xls  阅读(161)  评论(0编辑  收藏  举报