Write a Program to draw Line in C

/*Line*/
#include<stdio.h>
#include<conio.h>
#include<graphics.h>

int main()
{
   int gm,gd=DETECT;

   initgraph(&gd,&gm,"C:\\turboc3\\bgi");

   setcolor(YELLOW);
   outtextxy(300,170,"Line");
   line(300,190,330,190);

   getch();
   closegraph();
   return 0;
}

Previous
Next Post »