C++ Programming Ch.4 Exercise 2 Solution
Problem: μ μ κ³΅κ° 5κ°λ₯Ό λ°°μ΄λ‘ λμ ν λΉλ°κ³ , μ μλ₯Ό 5κ° μ λ ₯λ°μ νκ· μ ꡬνκ³ μΆλ ₯ν λ€ λ°°μ΄μ μλ©Έμν€λλ‘ main() ν¨μλ₯Ό μμ±νλΌ. Objective & Hints: λ°°μ΄μ λμ ν λΉ λ° λ°ν Execution Result: Code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #include using namespace std; int main() { int *p = new int[5]; double sum = 0; cout << "μ μ 5κ° μ λ ₯>>"; for(int i=0; i<5; i++) { cin >> p[i]; sum += p[i]; } cout << "νκ· " << sum/5; delete [] p; } Explanation: ...