Laboratoriya mashg’uloti №7 Muxandislik masalalarini yechishda dasturlash tizimlari yordamida garafik va multimediya imkoniyatlaridan foydalanish Ishning maqsadi


Download 148.16 Kb.
bet3/4
Sana02.05.2023
Hajmi148.16 Kb.
#1422925
1   2   3   4
Bog'liq
7-Laboratoriya

1- Namuna. O„zbekiston bayrog„i #include
#include
#include
using namespace std;
int main()
{
initwindow (640,480);
setbkcolor (DARKGRAY);

cleardevice ();
setfillstyle (SOLID_FILL, BLUE);
bar (70, 50, 600, 150);
setfillstyle (SOLID_FILL, RED);
bar (70, 150, 600, 157);
setfillstyle (SOLID_FILL, WHITE);
bar (70, 157, 600, 257);
setfillstyle (SOLID_FILL, RED);

bar (70, 257, 600, 264);
setfillstyle (SOLID_FILL, GREEN);
bar (70, 264, 600, 350);
setfillstyle (SOLID_FILL, WHITE);
fillellipse (125, 100, 45, 45);
setcolor (BLUE);
setfillstyle (SOLID_FILL, BLUE);
fillellipse (142, 100, 37, 37);
setbkcolor (BLUE);
setcolor (WHITE);
settextstyle (8, 0, 4);
outtextxy (160, 60, "*** ");
outtextxy (160, 88, "**** ");
outtextxy (160, 118,"*****");
getch();
closegraph();
}




2- Namuna. C++ da kuchukni uyini chizing. С++ tilidagi dasturi #include
#include
#include
int main()
{
initwindow(700,600);
setfillstyle(1,9);
bar(100,100,300,200);
setcolor(13);
rectangle(100,100,300,200);
moveto(100,100);
lineto(200, 50);
lineto(300,100);
setfillstyle(1,14);
floodfill(200, 75, 13);
setcolor(15);
circle(200, 150,50);
setfillstyle(1, 10);
floodfill(200,150, 15);
setcolor(12);
outtextxy(100, 230,"-Sharikning uyi-");
getch(); closegraph();
return 0;}

4.1- variant. Grafikaga oid variantlar

4.1-jadval.


Download 148.16 Kb.

Do'stlaringiz bilan baham:
1   2   3   4




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