C Program to Draw a Line in Graphics

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
  int gd=DETECT,gm;
  initgraph(&gd,&gm,"C:\\TC\\BGI");
  line(100,100,200,200); //Line(X1,Y1,X2,Y2);
  getch();
  closegraph();
}

OUTPUT:


No comments:

Post a Comment