///////////////////////////////////////////////////////////////////////////// // Umbrella Project.... // ///////////////////////////////////////////////////////////////////////////// #include<constream.h> #include<graphics.h> #include<dos.h> void main(){ int gm, gd = DETECT; initgraph(&gd,&gm,"e:\\tc\\bgi"); cleardevice(); settextstyle(10,0,4); outtextxy(180,25,"UMBRELLA"); setcolor(12); outtextxy(181,26,"UMBRELLA"); int col,i,row,scol,ecol; //// lines for filling the umbrella setcolor(6); arc(280,150,0,180,43); arc(280,150,0,180,42); line(238,140,322,140); line(238,139,322,139); line(239,139,321,139); line(240,139,320,139); scol=238,ecol=322; row=140; for(i=1;i<=32;i++){ line(scol,row,ecol,row); if(i%2==0){ if(i>=17){ scol+=1.5,ecol-=1.5; if(i>=25){ scol+=3; } } scol+=1,ecol-=1; } row--; } ////////////////////////////////////////////////////////////////////////////// // 1st handle arc(246,149,0,180,9); arc(246,148,0,180,9); arc(246,147,0,180,9); arc(247,146,0,180,9); // 2nd handle arc(263,149,0,180,9); arc(263,148,0,180,9); arc(263,147,0,180,9); arc(262,146,0,180,9); // 3rd handle arc(280,149,0,180,9); arc(280,148,0,180,9); arc(280,147,0,180,9); arc(280,146,0,180,9); arc(280,145,0,180,9); arc(280,144,0,180,9); arc(280,143,0,180,9); // 4th handle arc(297,149,0,180,9); arc(297,148,0,180,9); arc(297,147,0,180,9); // 5th handle arc(314,149,0,180,9); arc(314,148,0,180,9); arc(314,147,0,180,9); arc(314,146,0,180,9); arc(313,145,0,180,9); arc(314,144,0,180,9); line(299,110,310,120); line(298,110,310,120); line(296,112,312,121); setcolor(15); arc(280,150,0,180,44); col=246; for(i=0;i<=4;i++){ arc(col,150,0,180,9); col+=17; } // code for handle of umbrella line(279,142,279,200); line(283,143,283,200); setfillstyle(6,12); bar(280,143,282,199); setcolor(12); arc(273,200,180,360,9); arc(273,200,180,360,8); arc(273,200,180,360,7); setcolor(15); arc(273,200,180,360,10); arc(273,200,180,360,6); line(263,200,267,200); getch(); getch(); }
C Program To Create Umbrella
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