C graphics program to draw bar.
#include <graphics.h>
#include <stdio.h>
int main( )
{
int gd=DETECT, gm;
initgraph(&gd,&gm,"C:\\tc\\bgi");
bar(100,100,400,300);
getch();
closegraph();
return 0;
}
- Syntax to draw a bar is bar(int left,int top,int right,int bottom)
- Bar is used to draw rectangular bar.
- It takes 4 arguments, all of the int datatypes.
- First two arguments are left-top corner of the bar
- Last two arguments are right-bottom corner of the bar.
C Graphics program to draw bar.
#include <graphics.h>
#include <stdio.h>
int main( )
{
int gd=DETECT, gm;
initgraph(&gd,&gm,"C:\\tc\\bgi");
bar(100,100,400,300);
getch();
closegraph();
return 0;
}
Download |
---|
the above link is not working
ReplyDeleteClick to see the code!
To insert emoticon you must added at least one space before the code.