2018-10-24

两个字符交换位置

int a = 5, b = 10;

 Console.WriteLine("num1="+a + "num2="+b);

   a = a + b;

   b = a - b;

   a = a - b;

    Console.WriteLine("num1=" + a + "num2=" + b);

    Console.ReadKey();

你可能感兴趣的:(2018-10-24)