Untitled

 avatar
canhquydev
plain_text
a year ago
629 B
4
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