C Graphics Program To Draw A Line
C Graphics Program To Draw A Line
line */
#include<graphics.h>
#include<graphics.h>
#include<conio.h>
int main() { #include<conio.h>
int gd = DETECT, gm; void main()
/* initialization of graphic {
mode */ int gd=DETECT,gm;
initgraph(&gd, &gm,
"C:\\TC\\BGI");
initgraph(&gd,&gm,"C:\\TC\\bgi");
line(100,100,200, 200); line(150,100,100,200);
getch(); line(100,200,200,200);
closegraph(); line(200,200,150,100);
return 0; line(100,125,200,125);
}
line(100,125,150,225);
line(150,225,200,125);
#include<stdio.h> getch();
#include<graphics.h> closegraph();
#include<conio.h> }
int main(){ #include<graphics.h>
int gd = DETECT,gm; #include<conio.h>
int x ,y ,radius=80;
initgraph(&gd, &gm, main()
"C:\\TC\\BGI"); {
/* Initialize center of circle int gd =
with center of screen */ DETECT,gm,left=100,top=100,right=20
x = getmaxx()/2; 0,bottom=200,x=
y = getmaxy()/2; 300,y=150,radius=50;
getch();
closegraph();
return 0;
}