C++ Programming Ch.3 Exercise 8 Solution
Problem: int νμ μ μ μλ₯Ό κ°μ²΄νν Integer ν΄λμ€λ₯Ό μμ±νλΌ. Integerμ λͺ¨λ λ©€λ² ν¨μλ₯Ό μλ μΈλΌμΈμΌλ‘ μμ±νλΌ. Integer ν΄λμ€λ₯Ό νμ©νλ μ½λλ λ€μκ³Ό κ°λ€. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #include #include using namespace std; int main() { Integer n(30); cout << n.get() << ' '; // 30 μΆλ ₯ n.set(50); cout << n.get() << ' '; // 50 μΆλ ₯ Integer m("300"); cout << m.get() << ' '; // 300 μΆλ ₯ cout << m.isEven(); // true(μ μλ‘ 1) μΆλ ₯ } Objective & Hints: ...