// nhap mang n phan tu rui in ra tong cac so chan #include <iostream.h> void main(){ char t; int n,i,tong=0; int a[100]; do{ cout<<"nhap vao so phan tu cua mang : ";cin>>n; for(i=0;i<n;i++){ cout<<"nhap vao tu a["<<i<<"]= "; cin>>a[i]; } for(i=0;i<n;i++){ if((a[i])%2==0) tong+=a[i]; } cout<<"tong s = "<<tong<<endl; cout<<"ban co muon nhap vao nua ko ?"; cin>>t; } while (t=='c'); }