• include using namespace std; int main() { vector Z = {10, -5, -8, -6, 17, 25, 31, 10, 12, 38}; vector musbatElementlar;
  • 2-Mustaqil ish Dasturlash Guruh: prg008-2 Bajardi: Davranov Azimjon Tekshirdi: Saidov Samandar #include




    Download 249,77 Kb.
    Sana17.11.2023
    Hajmi249,77 Kb.
    #100547
    Bog'liq
    Davranov Azimjon dasturlash 2




    Muhammad Al-Xorazmiy nomidagi
    Toshkent axborot texnologiyalari universiteti

    2-Mustaqil ish

    Dasturlash



    Guruh:PRG008-2
    Bajardi: Davranov Azimjon
    Tekshirdi: Saidov Samandar

    #include
    #include
    using namespace std;
    int main() {
    vector Z = {10, -5, -8, -6, 17, 25, 31, 10, 12, 38};
    vector musbatElementlar;
    vector musbatIndekslar;
    for (int j = 0; j < Z.size(); ++j) {
    if (Z[j] > 0) {
    musbatElementlar.push_back(Z[j]);
    musbatIndekslar.push_back(j);
    }
    }
    int musbatElementlarSoni = musbatElementlar.size();
    cout << "Musbat elementlar soni: " << musbatElementlarSoni << endl;
    cout << "Musbat elementlar indekslari: ";
    for (int i = 0; i < musbatIndekslar.size(); ++i) {
    cout << musbatIndekslar[i] << " ";
    }
    return 0;
    }



    Download 249,77 Kb.




    Download 249,77 Kb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    2-Mustaqil ish Dasturlash Guruh: prg008-2 Bajardi: Davranov Azimjon Tekshirdi: Saidov Samandar #include

    Download 249,77 Kb.