Untitled
canhquydev
plain_text
2 years ago
629 B
7
Indexable
case 12:
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--;
}
}
xuatmang(a, n);
}
Editor is loading...
Leave a Comment