1- dars. Mavzu: Masalalarni kompyuterda yechish bosqichlari Darsning texnologik xaritasi




Download 1,92 Mb.
bet156/208
Sana23.07.2021
Hajmi1,92 Mb.
#15865
1   ...   152   153   154   155   156   157   158   159   ...   208
Yangi mavzuni mustaxkamlash.

3-misol. Uchta uchburchak uchlarining quyidagi koordinatalari berilgan: 1) (120,20), (80,170), (140,150); 2) (200,97), (500,156), (210,180); 3) (300,190), (200,390), (415,222).

Shu uchburchaklarni mos ravishda qizil, sariq va yashil ranglarda chizish dasturini tuzing.

Uses Graph;

var gd, gm: Integer; Procedure Uchburchak(xl,yl,x2,y2,x3,y3,col:Integer); begin

SetColor(col); Line(xl,yl,x2,y2); Line(x2,y2,x3,y3);

Line(x3,y3,xl,yl);

end;

Begin gd:=0; InitGraph(gd,gm, "); Uchburchak(120,20,80,170,140,150,4); Uchburchak(200,97,500,156,210,180,14); Uchburchak(300,190,200,390,415,222,2); ReadLn; CloseGraph; End.



Yuqorida keltirilgan dasturlarga e'tiborni qaratib, quyidagi xulosaga kelish mumkin: protsedura va funksiyalarga murojaat etish vaqtida funksiya nomi albatta biror operator tarkibida, protsedura nomi esa alohida (mustaqil) yozilar ekan.


Uyga vazifa: 4- mashqni dasturini tuzish.

Sana :______________

Sinf :_______________


Download 1,92 Mb.
1   ...   152   153   154   155   156   157   158   159   ...   208




Download 1,92 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



1- dars. Mavzu: Masalalarni kompyuterda yechish bosqichlari Darsning texnologik xaritasi

Download 1,92 Mb.