练习2.3
#include <iostream>
using namespace std;int main() {unsigned u = 10, u2 = 42;cout << u2 - u << endl;cout << u - u2 << endl;int i = 10, i2 = 42;cout << i2 - i << endl;cout << i - i2 << endl;cout << i - u << endl;cout << u - i << endl;return 0;
}
测试结果:
分析: