8-variant Bajardi: Tolibov. Z. Qabul qildi: Raxmanov A. T. Toshkent 2022


Download 446.99 Kb.
Sana08.05.2023
Hajmi446.99 Kb.
#1445463
Bog'liq
2-laboratoriya




MUHAMMAD Al-XORAZMIY NOMIDAGI
TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI




Laboratoriya ishi -2 1111 1


8-variant


Bajardi: Tolibov. Z.
Qabul qildi: Raxmanov A. T.

TOSHKENT 2022
8. N o’lchamli massiv berilgan. Undagi 3 ga qoldiqsiz bo’linadigan elementlarini yangi vektorga yozing.
#include
using namespace std;
int main(){
srand(time(0));
int n;
cout<<" n = "; cin>>n;
int son[n]; vector g1;
for(int i=0; ison[i]=rand()%25+1;
}
for(int i=0; icout<} cout<int q1,q2,q3;
for(int i=0; iif(son[i]%3==0) g1.push_back(son[i]);
} cout<<" New vektor: ";
for (auto i = g1.begin(); i != g1.end(); ++i)
cout << *i << " ";
cout<return main();
}

Download 446.99 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling