#编码
int num1 = 21;
int num2 = 5;
//交换前输出
Console.WriteLine("num:" + num1 + ",num2:" + num2);
num1 = num1 + num2;
num2 = num1 - num2;
num1 = num1 - num2;
//交换后输出
Console.WriteLine("num:" + num1 + ",num2:" + num2);
Console.ReadKey();
int num1 = 21;
int num2 = 5;
//交换前输出
Console.WriteLine("num:" + num1 + ",num2:" + num2);
num1 = num1 + num2;
num2 = num1 - num2;
num1 = num1 - num2;
//交换后输出
Console.WriteLine("num:" + num1 + ",num2:" + num2);
Console.ReadKey();
本文标题:第二节课的第一个作业
本文链接:https://www.haomeiwen.com/subject/egtjzftx.html
网友评论