program ellipes;
uses graph;
var gd, gm: integer;
begin
gd:=detect;
initgraph(gd, gm, ‘ ‘ );
setfillstyle(7, blue);
bar(0,0,getmaxx, getmaxy);
setcolor(3);
setfillstyle(11, lightred);
setfillstyle(11,lightred);
fillellipse(getmaxx div 2, getmaxy div 2, 200,90);
121
readln;
closegraph;
end.
Yuqorida keltirilagan operatorlar va yordamchi suzlardan foydalanib, to‘g‘ri Chiziq, aylana, yoy,
ellips, ellipsli yoy chizish dasturini keltiramiz. Bu dastur Turbo Pascal tizimida quyidagi ko‘rinishda
bo‘ladi.
program mashq3;
uses graph;
var x,y,r:integer;
begin
initgraph(x,y, ' ');
setcolor(9); lineto(640,480);
setcolor(12); line(500,200,200,400);
setcolor(4); circle(325,225,200);
setcolor(5); arc(325,225,0,180,100);
setcolor(6); pieslice(220,300,90,280,50);
Do'stlaringiz bilan baham: |