给定两个整型变量的值,将两个值的内容进行交换

#include <stdio.h>
#include<stdlib.h>
void main()
{
	int num;
	int a = 10;
	int b = 20;
	num = a;
	a = b;
	b = num;
	printf("a=%d\n", a);
	printf("b=%d\n", b);
	system("pause");
}

猜你喜欢

转载自blog.csdn.net/qq_43765564/article/details/84592645