1.#include<graphics.h>
2.#include<conio.h>
3.
4.int main()
5.{
6. int gd = DETECT, gm;
7. int x1=50,y1=50,x2=200,y2=100;
8. initgraph(&gd, &gm, "C:\\TC\\BGI");
9. setcolor(9);
10. line(x1,y1,x2,y2);
11.
12. getch();
13. closegraph();
14. return 0;
15.}