rectangle from line()

C program to make rectangle using line function-

#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT, gm;
clrscr();
initgraph(&gd,&gm,"c:\\turboc3\\bgi");
setcolor(3);
line(30,15,100,15);
line(30,100,30,15);
line(30,100,100,100);
line(100,100,100,15);
getch();

}

Comments

Popular posts from this blog

Java Program to print any matter

Line

putpixel in c