题解 | 交换两个变量的值
#include <iostream> using namespace std; int main() { int a = 0; int b = 0; cin >> a; cin >> b; //write your code here....... int temp; temp = a; a = b; b = temp; cout << a << " " << b << endl; return 0; }
#include <iostream> using namespace std; int main() { int a = 0; int b = 0; cin >> a; cin >> b; //write your code here....... int temp; temp = a; a = b; b = temp; cout << a << " " << b << endl; return 0; }
相关推荐