#include <iostream>
using namespace std;
int main()
{
int a, b, t;
cin >> a >> b;
t = a;
a = b;
b = t;
cout << "a=" << a << " " << "b=" << b;
}
交换两个变量的值
最新推荐文章于 2024-09-10 19:16:08 发布
#include <iostream>
using namespace std;
int main()
{
int a, b, t;
cin >> a >> b;
t = a;
a = b;
b = t;
cout << "a=" << a << " " << "b=" << b;
}