
Program to create a bar
#include <stdio.h>
#include <conio.h>
void main()
{
int d,m;
int midx,midy;
d=DETECT;
initgraph(&d,&m,"c:\\tc\\bgi");
midx=getmaxx()/2;
midy=getmaxy()/2;
bar(midx+50,midy+50,midx-50,midy-50); //solid bar
getch();
closegraph();
}
Output :

0 comments:
Post a Comment