///////////////////////////////////////////////////////////////////////////// // Quilt Project.... // ///////////////////////////////////////////////////////////////////////////// #include<constream.h> #include<graphics.h> #include<dos.h> int bars(int,int,int,int); void main(){ int gm, gd = DETECT; initgraph(&gd,&gm,"e:\\tc\\bgi"); cleardevice(); int scol,srow,ecol,erow,i,j,col,row,w,x,y,z; setfillstyle(1,15); bar(1,1,640,480); setcolor(0); rectangle(200,140,382,267);// inner rectangle. // for brown pato........... scol=191,srow=131,ecol=391,erow=276; for(i=1;i<=9;i++){ setcolor(RED); rectangle(scol,srow,ecol,erow); scol++,srow++,ecol--,erow--; } setfillstyle(1,0); ////////////////////////// calling of bars function x=141,z=154; for(i=1;i<=5;i++){ w=214,y=228; for(j=1;j<=6;j++){ bars(w,x,y,z);// user defined function w+=28,y+=28;} x+=28,z+=28; } x=154,z=170; for(i=1;i<=4;i++){ w=200,y=214; for(j=1;j<=6;j++){ bars(w,x,y,z);// user defined function w+=28,y+=28;} x+=28,z+=28; } srow=154,erow=169; for(i=1;i<=4;i++){ bar(368,srow,382,erow); srow+=28; erow+=28; }setcolor(0); rectangle(182,122,400,286); int color=0; scol=183,srow=123,ecol=399,erow=285; for(i=1;i<=8;i++){ setcolor(YELLOW); rectangle(scol,srow,ecol,erow); scol++,srow++,ecol--,erow--; } setcolor(0); rectangle(190,130,392,277); settextstyle(10,0,5); outtextxy(200,20,"QUILT."); setcolor(7); outtextxy(198,18,"QUILT."); getch(); getch(); } int bars(int a,int b, int c, int d){ bar(a,b,c,d); }
C Program To Create Quilt
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