program poly;
uses graph;
var gd,gm,gr:integer;
p:array[1..3] of PointType;
begin
gd:=VGA;
gm:=VGAHi;
InitGraph(gd,gm,'');
gr:=GraphResult;
writeln(GraphErrorMsg(gr));
if gr=grOk then begin
SetColor(blue);
p[1].x:=50;
p[1].y:=50;
p[2].x:=200;
p[2].y:=100;
p[3].x:=50;
p[3].y:=100;
SetFillStyle(SolidFill,yellow);
FillPoly(3,p);
readln;
CloseGraph;
end;
end.
