No older revisions available
No older revisions available
문제3 배열 크기 할당해서 보기 ¶
~cpp #include<iostream> using namespace std; void main(){ int *i = new int[4]; int *a = new int[4]; int *tmp = new int[4]; cin >> *i; cin >> *a; for(int j=0; j<4;j++) tmp[j] = a[j] + i[j]; cout << *tmp <<endl; delete [] i; delete [] a; delete [] tmp; }