Swd008-L2 guruh talabasi Yo’ldoshev Furqatjon


Download 0.56 Mb.
Sana25.06.2023
Hajmi0.56 Mb.
#1654443

O’ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIYALARI VA KOMMUNIKATSIYALARINI RIVOJLANTIRISH VAZIRLIGI MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI


Dasturlash 2 fani bo’yicha

6-labaratoriya ishi
Bajardi SWD008-L2 guruh talabasi
Yo’ldoshev Furqatjon
Tekshirdi: Gulyamova Dilfuza
Toshkent 2022
Mavzu:Sonli klasslar
32-variant


1)
#include
#include
#include
using namespace std;
int main()
{ int n;
complex a( polar (15.0, 0.0));
complex b( polar (9.0, 0.0));
cout << "a va b ning ayirmasi " << a - b;
}



2)
#include


#include
#include
#include
#include
using namespace std;
int main()
{ srand(time(0));
int n;
cout<<"Element soni: ";
cin >> n;
valarray a(n);
for(int i = 0; i < n; i++) {
a[i] = rand()%50;
cout << a[i] <<"\t";
}
cout<<"\n\n\n";
valarray b= a[slice(0, 32, 2)];
for(int i = 0; i < b.size(); i++)
{
cout << b[i] << "\t";
}
}


3)
#include


#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
srand(time(0));
valarray a(0,32);
size_t start = 0;
size_t lengths[] = {2,5};
size_t strides[] = {3,3};
gslice b (start, valarray (lengths,2), valarray (strides,31));
a[b]=32;
for(int i=0;i{
cout<}
}




Download 0.56 Mb.

Do'stlaringiz bilan baham:




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