C Program To Create ZEBRA

/////////////////////////////////////////////////////////////////////////////
//     Zebra Project....                        //
/////////////////////////////////////////////////////////////////////////////

#include<constream.h>
#include<graphics.h>
#include<dos.h>
void main(){
 int gm, gd = DETECT;
 initgraph(&gd,&gm,"e:\\tc\\bgi");
 cleardevice();
 bar(1,1,640,480);
 setcolor(0);
 rectangle(220,150,340,270);
 line(245,150,220,175);
 int scol=245,srow,ecol=220,erow=175;
//for 1st filling
 for(int i=1;i<=25;i++)
 {line(scol,150,ecol,erow);
  scol++,ecol++;
 }ecol=243;
  int row=176;
   for( i=1;i<=23;i++)
 {line(221,row,ecol,row);
   ecol--;
   row++;
   }
// for 2nd filling
 srow=150,erow=225;
   for( i=1;i<=26;i++)
  {line(295,srow,220,erow);
  srow++;
  erow++;
  }
 //for  3rd filling
  line(340,155,225,270);
   srow=155,erow=245;
  for( i=1;i<=25;i++)
  { line(340,srow,250,erow);
  srow++,erow++;
  }
  scol=296;
  erow=174;
  for( i=1;i<=25;i++)
 {
 line(scol,150,scol,erow);
 scol++, erow--;
   }
 scol=249;
 srow=246;
for(i=1;i<=25;i++){
 line(scol,srow,scol,270);
 scol--,srow++;
}
   setcolor(0);
 //for 4th filling
  line(340,210,280,270);
   srow=210,erow=240;
 for( i=1;i<=30;i++)
  {line(340,srow,310,erow);
  srow++;
  erow++;}
 scol=309;
   srow=242,erow=269;
   for( i=1;i<=28;i++)
  {line(scol,srow,scol,erow);
   scol--,srow++;
   }

 getch();
 getch();
}
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