#include using namespace std; //岿粇swapㄧ计 void swap(int x, int y); int main() { int num1 = 5; int num2 = 10; cout << "跑计num1" << num1 << "\n"; cout << "跑计num2" << num2 << "\n"; cout << "跑计num1籔num2秈︽ユ传\n"; swap(num1, num2); cout << "跑计num1" << num1 << "\n"; cout << "跑计num2" << num2 << "\n"; return 0; } //岿粇swapㄧ计﹚竡 void swap(int x, int y) { int tmp; tmp = x; x = y; y = tmp; }