Guruh talabasi Mirabdullayev Fayzullo 3-labaratoriya mashg`uloti


Download 7.62 Kb.
Sana16.06.2023
Hajmi7.62 Kb.
#1489627
Bog'liq
algoritmlash 3-lab


713-21-guruh talabasi Mirabdullayev Fayzullo
3-labaratoriya mashg`uloti
7. Ikkita ro‘yhat umumiy elementlaridan tashkil topgan ro‘yhat yaratilsin.
#include
using namespace std;
int main(){
int n;
cout<<"n=";
cin>>n;
int a[n], b[n], c[n];
cout<<"a to`plam->";
for(int i=0; i cin>>a[i];
}
cout<<"b to`plam->";
for(int i=0; i cin>>b[i];
}
int z=0;
for(int i=0; i for(int j=0; j if(a[i]==b[j]){
c[z]=a[i];
z++;
}
}
}
cout<<"c to`plam->";
for(int i=0; i cout< }
return 0;
}

Download 7.62 Kb.

Do'stlaringiz bilan baham:




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