Нарисовать стакан — Pascal(Паскаль)

uses graph;
var gd,gm,c,i:integer;
    p:array[1..12] of Pointtype;
begin
gd:=detect;
initgraph(gd,gm,'');
setcolor(10);
circle(340,105,50);
Setfillstyle(1,10);
fillellipse(340,105,50,50);
setcolor(12);
circle(290,170,50);
Setfillstyle(1,12);
fillellipse(290,170,50,50);
setcolor(13);
circle(390,190,50);
Setfillstyle(1,13);
fillellipse(390,190,50,50);
p[1].x:=240;p[1].y:=190;
p[2].x:=440;p[2].y:=190;
p[3].x:=440;p[3].y:=240;
p[4].x:=345;p[4].y:=265;
p[5].x:=345;p[5].y:=365;
p[6].x:=440;p[6].y:=390;
p[7].x:=240;p[7].y:=390;
p[8].x:=335;p[8].y:=365;
p[9].x:=335;p[9].y:=265;
p[10].x:=240;p[10].y:=240;
p[11].x:=p[1].x;p[11].y:=p[1].y;
setcolor(11);
moveto(p[1].x,p[1].y);
for i:=1 to 11 do
lineto(p[i].x,p[i].y);
Setfillstyle(1,11);
fillpoly(11,p);
readln
end.

Leave a Comment

+ 82 = 92