C++学习(三):交换2个数

#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
    int i;
    cin >> i;
    int j;
    cin >> j;

    i = i + j;
    j = i - j;
    i = i - j;

    cout << i << endl; 
    cout << j << endl;
    system("pause");
    return 0;
}
原文地址:https://www.cnblogs.com/liw66/p/11760410.html