public static void changemethod(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
Console.Write(a);
Console.Write(" ");
Console.Write(b);
Console.Read();
}
调用方法
changemethod(1,2);
输出结果:
2 1
public static void changemethod(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
Console.Write(a);
Console.Write(" ");
Console.Write(b);
Console.Read();
}
调用方法
changemethod(1,2);
输出结果:
2 1
相关文章: