C Program To Create A Wall

/////////////////////////////////////////////////////////////////////////////
//     Wall Project....                     //
/////////////////////////////////////////////////////////////////////////////
 
#include<constream.h>
#include<graphics.h>
#include<dos.h>
void main(){
 int gm, gd = DETECT;
 initgraph(&gd,&gm,"e:\\tc\\bgi");
cleardevice();
int scol,srow,ecol,erow,i,col;
settextstyle(1,0,7);
outtextxy(230,25,"WALL");
setcolor(WHITE);
rectangle(209,119,406,221);
scol=210,srow=120,ecol=405,erow=220;
for(i=1;i<=56;i++){

setcolor(6);

rectangle(scol,srow,ecol,erow);
scol++,srow++,ecol--,erow--;
}
setcolor(15);
line(210,140,405,140);
line(210,160,405,160);
line(210,180,405,180);
line(210,200,405,200);
col=240;
srow=120,erow=140;
for( i=0;i<=3;i++){for(int j=1;j<=3;j++){line(col,srow,col,erow);srow+=40,erow+=40;}
col+=40;srow=120,erow=140;}
col=258;
srow=140,erow=160;
  for( i=0;i<=3;i++){
    for(int j=2;j<=3;j++){
       line(col,srow,col,erow);srow+=40,erow+=40;}
    col+=40;srow=140,erow=160;}



/*line(245,120,245,230);
line(285,120,285,230);
line(325,120,325,230);
line(365,120,365,230);*/






 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