///////////////////////////////////////////////////////////////////////////// // Desk Project.... // ///////////////////////////////////////////////////////////////////////////// #include<constream.h> #include<graphics.h> void main(){ int gm, gd = DETECT; int i,scol,ecol,srow,erow; initgraph(&gd,&gm,"e:\\tc\\bgi"); cleardevice(); settextstyle(10,0,6); outtextxy(190,15,"DESK"); line(220,150,370,150); line(220,150,213,190); line(370,150,377,190); setfillstyle(6,5); bar(213,190,377,195); line(220,196,220,260); setcolor(4); srow=196; for(i=1;i<=10;i++){ line(227,srow,370,srow); scol++; srow++; } scol=221; for(i=0;i<5;i++){ line(scol,196,scol,260);//lines for left legs scol++; } setcolor(WHITE); line(226,196,226,260); line(220,260,226,260); line(226,206,260,206); line(260,206,260,260); line(265,206,265,260); setcolor(RED); scol=261; for(i=1;i<=4;i++){ line(scol,206,scol,260); scol++; } setcolor(WHITE); line(370,195,370,260);// lines for right leg line(360,206,360,260); setcolor(RED); scol=361; for(i=1;i<=9;i++){ line(scol,206,scol,260); scol++; } setcolor(WHITE); line(360,260,370,260); line(265,206,360,206); setfillstyle(11,10); bar(270,210,355,250); line(270,254,355,254); line(270,254,270,258); line(260,260,265,260); line(265,260,270,257); line(355,254,355,258); line(360,260,355,258); // line(220,150,213,190); scol=221,ecol=214; setcolor(BROWN); for(i=0;i<=100;i++){ line(scol,151,ecol,189); scol++; ecol++; } // line(370,150,377,190); scol=369,ecol=376; for( i=0;i<=61;i++){ line(scol,151,ecol,189); scol--; ecol--; } getch(); getch(); }
C Program For Creating a Desk
January 04, 2015
By:
Bhanu Namikaze
Bhanu Namikaze
Bhanu Namikaze is an Ethical Hacker, Security Analyst, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and Capture the Flags. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.
No comments:
Post a Comment