交换两个整数

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main()
{
	int a, b, c;
	printf("输入2个数:\n");
		scanf("%d%d", &a,&b);
		c = a;
		a = b;
		b = c;
	printf("%d %d", a,b);
	system("pause");
}

猜你喜欢

转载自blog.csdn.net/qq940051592/article/details/84405406