Skip to content

Instantly share code, notes, and snippets.

@w3Abhishek
Created July 31, 2021 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save w3Abhishek/b20882c3cc6ac47f09f21bf46cfbc79b to your computer and use it in GitHub Desktop.
Save w3Abhishek/b20882c3cc6ac47f09f21bf46cfbc79b to your computer and use it in GitHub Desktop.
#include <graphics.h>
#include <conio.h>
int main() {
int gd = DETECT, gm;
initgraph(&gd, &gm, "X:\\TC\\BGI");
settextstyle(BOLD_FONT,HORIZ_DIR,2);
outtextxy(275,0,"BAR GRAPH");
setlinestyle(SOLID_LINE,0,2);
line(90,410,90,50);
line(90,410,590,410);
line(85,60,90,50);
line(95,60,90,50);
line(585,405,590,410);
line(585,415,590,410);
outtextxy(65,60,"Y");
outtextxy(570,420,"X");
outtextxy(70,415,"O");
setfillstyle(XHATCH_FILL, RED);
bar(150,80,200,410);
bar(225,100,275,410);
bar(300,120,350,410);
bar(375,170,425,410);
bar(450,135,500,410);
getch();
closegraph();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment