#include <iostream>
using namespace std;
int main()
{
int a, b, i;
cout << "请分别输入a、b两个值" << endl;
cin >> a >> b;
i = a;
a = b;
b = i;
cout << "交换输出后的结果是" << "\n" << "a =" << a << "\n"
<< "b =" << b << endl;
return 0;
}
给出a,b 两个数的值,从键盘输入,将两个变量的值进行交换输出。
最新推荐文章于 2022-12-14 14:55:26 发布