C Program To Create A Pencil

/////////////////////////////////////////////////////////////////////////////
//     Pencil Project....                     //
/////////////////////////////////////////////////////////////////////////////
#include<constream.h>
#include<graphics.h>
void main(){
  int gm , gd = DETECT;
  initgraph(&gd,&gm,"e:\\tc\\bgi");
  cleardevice();
  int i,scol,srow,ecol,erow;
  settextstyle(10,0,5);
  outtextxy(200,25,"Pencil");
  setcolor(4);
  line(290,131,309,145);
  line(290,132,309,146);
  line(290,133,309,147);
  line(290,134,309,148);
  line(289,134,308,148);
  line(289,135,307,148);
  line(289,136,307,149);
  line(288,136,306,149);
  line(288,137,306,150);
  line(288,138,306,151);
  line(287,138,306,152);
  line(287,139,306,153);
  line(287,140,305,153);
  line(287,141,305,154);
  line(286,141,305,155);
  line(286,142,305,156);
  line(286,143,304,156);
  line(285,143,304,157);
  line(285,144,304,158);
  line(285,145,303,158);
  line(284,145,303,159);
  line(284,146,303,160);


//middle filling start here
setcolor(6);
   line(283,147,251,220);
   line(284,147,252,220);
   line(284,148,252,221);
   line(285,148,253,221);
   line(285,149,254,221);
   line(286,148,254,221);
   line(287,148,254,222);
   line(287,149,255,222);
   line(288,149,255,223);
   line(288,150,256,223);
   line(288,150,256,223);
   line(289,150,255,223);
   line(289,151,256,223);
   line(290,151,256,224);
   line(290,152,257,224);
   line(290,153,258,224);
   line(291,152,258,224);
   line(291,153,258,224);
   line(291,153,258,224);
   line(292,153,257,224);
   line(292,152,258,226);
   line(293,153,258,226);
   line(293,154,259,226);
   line(294,154,260,226);
   line(295,154,260,227);
   line(295,155,261,227);
   line(296,155,261,228);
   line(296,156,262,228);
   line(297,156,262,228);
   line(298,157,262,228);
   line(298,158,263,228);
   line(298,158,263,229);
   line(298,158,264,229);
   line(298,158,264,230);
   line(298,158,265,230);
   line(299,158,266,230);
   line(300,158,266,231);
   line(300,159,267,230);
   line(301,159,267,232);
   line(302,159,268,232);
   line(302,160,268,233);
   line(302,160,269,233);
   line(303,160,270,233);






setcolor(WHITE);


  //eraser lines
  line(290,130,310,145);
  line(283,145,302,160);

  //goro lines
 line(250,220,250,254);

  scol=251,srow=222,ecol=251,erow=254;
  setcolor(12);
for(i=1;i<=16;i++){
  line(scol,srow,ecol,erow);
  scol++;
  ecol++;
  srow++;
  erow--;}

 line(252,222,268,235);
 line(252,223,268,236);
 line(252,223,268,237);
 line(252,224,267,237);

  setcolor(WHITE);
  line(270,235,251,254);
 line(250,220,270,235);
  line(250,221,269,235);
    //main outer lines
 //
    line(290,130,250,219);
    line(310,145,270,235);



//MIDDLE LInes
  line(290,150,256,224);
 line(296,157,264,229);





  getch();

  getch();





}
Bhanu Namikaze

Bhanu Namikaze is an Ethical Hacker, Web Developer, Student and Mechanical Engineer. He Enjoys writing articles, Blogging, Solving Errors and Social Networking. Feel Free to let me know any of your concerns about hacking or let me know if you need any more methods on hacking anything. Enjoy Learning

No comments:

Post a Comment