#include <stdio.h>
#include <stdlib.h>
#include <graphics.h>
#include <conio.h>
void main ()
{
int gd,gm,error,x1,x2,x3,y1,y2,y3;
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"D:\\BORLANDC\\BGI");
error=graphresult();
if(error!=grOk)
{
puts("error!!!");
puts(grapherrormsg(error));
exit(1);
}
puts("vvedite posledovatelino x1,y1,x2,y2,x3,y3");
scanf("%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3);
setcolor(2);
setlinestyle(0,0,3);
settextstyle(8,0,2);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
outtextxy(x2+20,y2+20,"Treugolnik");
getch();
closegraph();
exit(0);
} |