题解 | 按照格式输入并交换输出
按照格式输入并交换输出
https://www.nowcoder.com/practice/95eb723a3e854376a7eb6d116cc7d875
#include <iostream>
#include <cstdio>
using namespace std;
void swap(int& a, int& b){
int c = b;
b = a;
a = c;
}
int main() {
int a, b;
char ch,eq;
cin >> ch >> eq >> a;
cin.ignore();
cin >> ch >> eq >> b;
swap(a,b);
cout << "a=" << a << ',' << "b=" << b <<endl;
return 0;
}
// 64 位输出请用 printf("%lld")void(0);
