【练】不允许创建临时变量,交换两个数的内容(附加题)

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int x = 5;
	int y = 9;
	x = x + y;
	y = x - y;
	x = x - y;
	printf("交换后的值为:x=%d y=%d\n",x,y);
	system("pause");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/LXL7868/article/details/88619201