Untitled
canhquydev
plain_text
a year ago
614 B
4
Indexable
cout<<"nhap so luong phan tu: "; cin>>n; nhapmang(a, n); for(int i = 0; i < n; i++){ b[i] = a[i]; } for(int i = 0; i < n; i++){ if(a[i] > nmax){ nmax = a[i]; } } for(int i = 0; i < n; i++){ if(a[i] == nmax){ for(int j = i; j < n; j++){ a[j] = b[j+1]; } n--; i--; } } xuatmang(a, n);
Editor is loading...
Leave a Comment