Tuesday, 4 March 2014

Horizontal Line And Vertical Line of Center Of Screen Using C

#include<conio.h>
#include<graphics.h>
#include<stdio.h>
void main()
{
int gd=DETECT,gm,maxx,maxy,midx,midy;
initgraph(&gd,&gm,"c:\\tc\\bgi");
cleardevice();
        maxx=getmaxx();
        maxy=getmaxy();
        midx=maxx/2;
        midy=maxy/2;
        line(0,midy,midx,maxy);
        line(midx,0,midx,maxy);
getch();
closegraph();
}


////////////////////////////OUTPUT//////////////////////////////



No comments:

Post a Comment