#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,b;
scanf_s("%d %d", &a, &b);
printf("a的值为%d,b的值为%d\n", a, b);
a = a + b;
b = a - b;
a = a - b;
printf("a的值为%d,b的值为%d\n", a, b);
system("pause");
return 0;
}
使用C语言不允许创建临时变量,交换两个数的内容
猜你喜欢
转载自blog.csdn.net/Richchigga/article/details/88728246
今日推荐
周排行