Untitled
canhquydev
plain_text
2 years ago
614 B
5
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