bar function of c graphics

C graphics program to draw bar.
  • 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;
}

bar function of c graphics

Download


1 comments:

  1. the above link is not working

    ReplyDelete
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.