C++ 交换两个整数的值 日期: 2028-03-01 标签: 常规 #include using namespace std; int main() { int a = 5; int b = 10; cout << 'Before swapping - a: ' << a << ', b: ' << b << endl; int temp = a; a = b; b = temp; cout << 'After swapping - a: ' << a << ', b: ' << b << endl; return 0; } 原文地址: https://www.cveoy.top/t/topic/pd4z 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录