交换两个变量的值
#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;
}
#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;
}