Meliboyev Umarali 614 20 guruh 10chi nomer



Download 31,43 Kb.
Sana09.08.2021
Hajmi31,43 Kb.
#143524
Bog'liq
Umarali Meliboyev 614 20


Dasturlash.

Meliboyev Umarali 614_20 guruh 10chi nomer

1-masala

#include

using namespace std;

int main()

{

int n, arr[100], a, b, soni = 0;



cout << "n = "; cin >> n;

qayt:


cout << "[a, b] oraliqni kiriting: " << endl;

cout << "a = "; cin >> a;

cout << "b = "; cin >> b;

if(a > b)

{

cout << "[a, b] oraliqni xato kiritdingiz, qayta ";



goto qayt;

}

for(int i = 0; i < n; i++)



{

cout << "arr[" << i << "]="; cin >> arr[i];

}

for(int i = 0; i < n; i++)



{

if(arr[i] < a || arr[i] > b)

{

soni++;


}

}

cout << "Soni = " << soni;



return 0;

}

2-masala:



#include

using namespace std;

int main()

{

int array[100][100];



int m, n, k;

int kopaytma = 1, yigindi = 0;

cout << "Qatorlar sonini kiriting: ";

cin >> m;

cout << "Ustunlar sonini kiritng: ";

cin >> n;

for (int i = 0; i < m; i++)

{

for (int j = 0; j < n; j++)



{

cout << "Matritsa " << i + 1 << "-qator " << j + 1 << "-ustun elementini kiriting: ";

cin >> array[i][j];

}

}



cout << "Matritsa elementlari: " << endl;

for (int i = 0; i < m; i++)

{

for (int j = 0; j < n; j++)



{

cout << array[i][j] << " ";

}

cout << endl;



}

cout << "0> k;

if (k > 0 && k <= m)

{

for (int i = 0; i < m; i++)



{

for (int j = 0; j < n; j++)

{

if (i == k - 1)



{

yigindi += array[i][j];

kopaytma *= array[i][j];

}

}



}

cout << k << "-satrdagi elementlar yig'indisi: " << yigindi << endl;

cout << k << "-satrdagi elementlar ko'paytmasi: " << kopaytma << endl;

}

else



cout << "Bunday satr mavjud emas!" << endl;

return 0;

}

3-masala:



#include

#include

using namespace std;

int main()

{

initwindow(750 , 460);



setbkcolor(COLOR(22, 85, 250));

cleardevice();

setcolor(COLOR(254, 215, 80));

setfillstyle(1, COLOR(254, 215, 80));

line(0,360, 750,396);

line(-1,361, 755,397);

floodfill(10, 400, COLOR(254, 215, 80));

setcolor(0);

ellipse(239, 115, 0, 0, 23, 30);

ellipse(290, 119, 0, 0, 30, 35);

setfillstyle(1, 15);

floodfill(239, 115, 0 );

floodfill(290, 121, 0 );

ellipse(235, 100, 0, 0, 11, 15);

setfillstyle(1, 0);

floodfill(235, 100 , 0 );

ellipse(285, 101, 0, 0, 13, 17);

setfillstyle(1, 0);

floodfill(285, 100 , 0 );

line(195,110, 216,108);

ellipse(197, 125, 90, 180, 15, 15);

ellipse(270, 125, 180, 330, 87, 52);

line(315,105, 340,103);

line(340,103, 368,103);

moveto(368, 103);

lineto(388, 80);

lineto(403, 65);

lineto(413, 63);

lineto(415, 105);

ellipse(415, 150, 20, 90, 120, 45);

ellipse(415, 150, 20, 90, 120, 45);

moveto(526, 133);

lineto(528, 130);

ellipse(605, 172, 95, 160, 85, 110);

ellipse(615, 120, 110, 180, 55, 60);

ellipse(620, 115, 180, 275, 60, 50);

ellipse(575, 158, 200, 360, 50,20);

ellipse(415, 150, 280, 360, 120, 45);

putpixel(435, 193, 15);

moveto(435, 193);

lineto(440, 198);

lineto(443, 200);

lineto(446, 202);

lineto(450, 207);

lineto(453, 210);

lineto(450, 211);

lineto(430, 208);

lineto(410, 198);

ellipse(410, 158, 180, 270, 60, 40);

putpixel(353, 161, 15);

moveto(353, 161);

lineto(343, 151);

ellipse(240, 116, 0, 0, 23, 30);

ellipse(291, 120, 0, 0, 30, 35);

setfillstyle(1, 15);

floodfill(239, 115, 0 );

floodfill(290, 121, 0 );

ellipse(235, 100, 0, 0, 11, 15);

setfillstyle(1, 0);

floodfill(235, 100 , 0 );

ellipse(285, 101, 0, 0, 13, 17);

setfillstyle(1, 0);

floodfill(285, 100 , 0 );

line(196,111, 216,108);

ellipse(198, 126, 90, 180, 15, 15);

ellipse(269, 126, 180, 330, 87, 52);

line(316,106, 340,103);

line(341,104, 368,103);

moveto(369, 104);

lineto(389, 81);

lineto(404, 66);

lineto(414, 65);

lineto(417, 106);

ellipse(416, 151, 20, 90, 120, 45);

ellipse(416, 151, 20, 90, 120, 45);

moveto(527, 134);

lineto(528, 130);

ellipse(606, 173, 95, 160, 85, 110);

ellipse(616, 121, 110, 180, 55, 60);

ellipse(621, 116, 180, 275, 60, 50);

ellipse(576, 159, 200, 360, 50,20);

ellipse(416, 151, 280, 360, 120, 45);

putpixel(435, 193, 15);

moveto(436, 194);

lineto(441, 199);

lineto(444, 201);

lineto(447, 203);

lineto(451, 208);

lineto(454, 211);

lineto(451, 212);

lineto(431, 210);

lineto(412, 199);

ellipse(411, 159, 180, 270, 60, 40);

putpixel(354, 162, 15);

moveto(354, 162);

lineto(344, 152);

moveto(352, 164);

lineto(343, 153);

ellipse(240, 115, 0, 0, 23, 30);

ellipse(291, 119, 0, 0, 30, 35);

setfillstyle(1, 15);

floodfill(239, 115, 0 );

floodfill(290, 121, 0 );

ellipse(236, 100, 0, 0, 11, 15);

setfillstyle(1, 0);

floodfill(235, 100 , 0 );

ellipse(286, 101, 0, 0, 13, 17);

setfillstyle(1, 0);

floodfill(285, 100 , 0 );

line(196,110, 216,108);

ellipse(198, 125, 90, 180, 15, 15);

ellipse(271, 125, 180, 330, 87, 52);

line(316,105, 340,103);

line(341,103, 368,103);

moveto(369, 103);

lineto(389, 80);

lineto(404, 65);

lineto(414, 63);

lineto(416, 105);

ellipse(416, 150, 20, 90, 120, 45);

ellipse(416, 150, 20, 90, 120, 45);

moveto(527, 133);

lineto(529, 130);

ellipse(606, 172, 95, 160, 85, 110);

ellipse(616, 120, 110, 180, 55, 60);

ellipse(621, 115, 180, 275, 60, 50);

ellipse(576, 158, 200, 360, 50,20);

ellipse(416, 150, 280, 360, 120, 45);

putpixel(436, 193, 15);

moveto(435, 193);

lineto(441, 198);

lineto(444, 200);

lineto(447, 202);

lineto(451, 207);

lineto(454, 210);

lineto(451, 211);

lineto(431, 208);

lineto(411, 198);

ellipse(411, 158, 180, 270, 60, 40);

putpixel(354, 161, 15);

moveto(354, 161);

lineto(344, 151);

ellipse(340, 160, 250, 360, 190, 100);

ellipse(270, 125, 180, 305, 85, 95);

ellipse(275, 210, 270, 370, 45, 45);

setfillstyle(1, 8);

floodfill(410, 158,0 );

setfillstyle(1, 7);

floodfill(360, 220,0 );

moveto(286, 216);

lineto(279, 235);

lineto(278, 255);

setfillstyle(1, 4);

floodfill(280, 235,0 );

ellipse(260, 223, 0, 0, 5, 6);

setfillstyle(1, 15);

floodfill(260, 225,0 );

ellipse(271, 224, 0, 0, 5, 6);

setfillstyle(1, 15);

floodfill(271, 225,0 );

ellipse(282, 223, 0, 0, 4, 5);

setfillstyle(1, 15);

floodfill(282, 223,0 );

ellipse(292, 220, 0, 0, 4, 5);

setfillstyle(1, 15);

floodfill(292, 220,0 );

ellipse(302, 216, 0, 0, 4, 5);

setfillstyle(1, 15);

floodfill(302, 216,0 );

ellipse(192, 135, 0, 0, 3, 3);

setfillstyle(1, 0);

floodfill(192, 135,0 );

ellipse(260, 170, 0, 0, 3, 3);

setfillstyle(1, 0);

floodfill(260, 170,0 );

ellipse(293, 119, -20, 5, 60, 50);

ellipse(294, 119, -20, 5, 60, 50);

ellipse(295, 119, -20, 5, 60, 50);

ellipse(285, 119, -17, 4, 60, 50);

ellipse(286, 119, -17, 4, 60, 50);

ellipse(287, 119, -17, 4, 60, 50);

getch();


}

Rasmi:



Download 31,43 Kb.

Do'stlaringiz bilan baham:




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish