A handy C-code snippet for all the programmers…

The following C-Code snippet illustrates how to use BARS, which are used for visual statistics… Have a quick look!


#include < graphics.h >
void main() {
int gd=DETECT,gm,maxx,maxy,x,y,button;
initgraph(&gd,&gm,”");
line(80,150,200,150);
line(80,150,80,50);
settextstyle(1,HORIZ_DIR,1);
outtextxy(100,153,”<-X axis");
settextstyle(1,VERT_DIR,1);
outtextxy(60,50,"<-Y axis");
bar(100,100,120,150);
bar(130,120,150,150);
closegraph();
}

Related posts:

  1. C# code snippet for demonstration of data casting!
  2. C-code snippet to print a file by removing comments
  3. C code snippet to generate Kaprekar’s magical constant 6174
  4. Useful JavaScript code snippet to save your website content from being copy-pasted!
  5. How to analyze the Google Adsense code?

Filed Under: Archive Categories

About the Author

Om is a dynamic entrepreneur, renowned author, and founder of Webfosys Networks Pvt Ltd that provides IT, content creation, SEO & Website Design services to several clients across the globe. He has written over 12,000 articles, and loves to write Latest Tech Reviews. Reach him 24/7 - om.thoke86@gmail.com

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.