#include<graphics.h>
#include<iostream.h>
#include <conio.h>
#include<dos.h>
#include<math.h>
#include<stdlib.h>
class visu
{public:
int o;
void a1(int x,int y)
{ setcolor(15);
line(x,y-110,x-110,y) ;
line(x-110,y,x,y+110);
line(x,y+110,x+110,y) ;
line(x+110,y,x,y-110);
for(int i=0;i<110;i++)
{line(x+110-1,y-1,x-1,y-110-1) ;
setcolor(10);
x--;y++;
}
}
void a2(int x,int y)
{ int a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3;
a=(x)-(50/(sqrt(2)));b=(y-110)+(50/(sqrt(2)));c=429-(50/(sqrt(2)));d=(289)+(50/(sqrt(2)));
setcolor(15);
line(a,b,c,d);
a1=(x)-(100/(sqrt(2)));b1=(y-110)+(100/(sqrt(2)));c1=429-(100/(sqrt(2)));d1=(289)+(100/(sqrt(2)));
setcolor(15);
line(a1,b1,c1,d1);
a2=(x)+(50/(sqrt(2)));b2=(y-110)+(50/(sqrt(2)));c2=209+(50/(sqrt(2)));d2=(289)+(50/(sqrt(2)));
setcolor(15);
line(a2,b2,c2,d2);
a3=(x)+(100/(sqrt(2)));b3=(y-110)+(100/(sqrt(2)));c3=209+(100/(sqrt(2)));d3=(289)+(100/(sqrt(2)));
setcolor(15);
line(a3,b3,c3,d3);
setcolor(15);
line(x,y-110,x,y-260);
line(x-110,y,x-110,y-150);
line(x+110,y,x+110,y-150);
line(x+110,y-150,x,y-260);
line(x,y-260,x-110,y-150);
}
void a3(int x, int y)
{ for(int i1=0;i1<110;i1++)
{
line(x,y-110-1,x,y-260+1);
setcolor(4);
x++;y++;
} }
void a4(int x, int y)
{ int a2, b2, c2, d2,a1,b1,c1,d1,a3,b3,c3,d3;
a2=(x)+(50/(sqrt(2)));b2=(y-110)+(50/(sqrt(2)));c2=(x)+(50/(sqrt(2)));d2=(y-110)+(50/(sqrt(2)))-150 ;
setcolor(15);
line(a2,b2,c2,d2);
a1=(x)+(100/(sqrt(2)));b1=(y-110)+(100/(sqrt(2)));c1=(x)+(100/(sqrt(2)));d1=(y-110)+(100/(sqrt(2)))-150 ;
setcolor(15);
line(a1,b1,c1,d1);
a3=(x);b3=(y-160);c3=(x+110);d3=(y-50) ;
setcolor(15);
line(a3,b3,c3,d3);
a3=(x);b3=(y-160-50);c3=(x+110);d3=(y-100) ;
setcolor(15);
line(a3,b3,c3,d3);
}
void a5(int x, int y)
{ for(int i1=0;i1<110;i1++)
{
line(x,y-110-1,x,y-260+1);
setcolor(3);
x--;y++;
} }
void a6(int x, int y)
{ int a2, b2, c2, d2,a1,b1,c1,d1,a3,b3,c3,d3;
a2=(x)-(50/(sqrt(2)));b2=(y-110)+(50/(sqrt(2)));c2=(x)-(50/(sqrt(2)));d2=(y-110)+(50/(sqrt(2)))-150 ;
setcolor(15);
line(a2,b2,c2,d2);
a1=(x)-(100/(sqrt(2)));b1=(y-110)+(100/(sqrt(2)));c1=(x)-(100/(sqrt(2)));d1=(y-110)+(100/(sqrt(2)))-150 ;
setcolor(15);
line(a1,b1,c1,d1);
a3=(x);b3=(y-160);c3=(x-110);d3=(y-50) ;
setcolor(15);
line(a3,b3,c3,d3);
a3=(x);b3=(y-160-50);c3=(x-110);d3=(y-100) ;
setcolor(15);
line(a3,b3,c3,d3);
settextstyle( 1 ,0,5);
setcolor(0);
outtextxy(x-10,y-100,"V");
settextstyle( 7 ,0,5);
setcolor(0);
outtextxy(x-85,y-20,"I S ");
outtextxy(x-10,y+50,"U");
settextstyle( 1 ,0,3);
setcolor(6);
outtextxy(x+10,y-240,"s");
outtextxy(x+50,y-150,"A");
outtextxy(x+90,y-60,"I");
setcolor(9);
outtextxy(x-60,y-200,"G");
outtextxy(x-100,y-110,"u");
outtextxy(x-60,y-140,"d");
outtextxy(x-20,y-185,"d");
outtextxy(x-60,y-90,"i");
settextstyle( 1 ,0,1);
setcolor(14);
outtextxy(x-45,y-45,"he");
outtextxy(x+20,y-50,"MAN");
outtextxy(x-45,y+15,"T");
outtextxy(x+35,y+15,"H");
while(!kbhit())
{
setcolor(rand());
settextstyle(1,0,5);
outtextxy(0,y,"VISU");
setcolor(rand()+2);
outtextxy(80,y-70,"VISU");
}
//for(int i=0;i<90;i++)
// {
sound(240);
// sound(12*random(100));
delay(1090) ;
nosound();
// }
setcolor(15);
}
};
void main()
{
int a=DETECT,b;int x,y,p,q;
initgraph(&a,&b,"c:\\turboc3\\bgi");
x=getmaxx()/2;
y=50+getmaxy()/2;
visu v;
v.a1(x,y);
v.a2(x,y);
v.a3(x,y);
v.a4(x,y);
v.a5(x,y);
v.a6(x,y);
getch();
}
#include<iostream.h>
#include <conio.h>
#include<dos.h>
#include<math.h>
#include<stdlib.h>
class visu
{public:
int o;
void a1(int x,int y)
{ setcolor(15);
line(x,y-110,x-110,y) ;
line(x-110,y,x,y+110);
line(x,y+110,x+110,y) ;
line(x+110,y,x,y-110);
for(int i=0;i<110;i++)
{line(x+110-1,y-1,x-1,y-110-1) ;
setcolor(10);
x--;y++;
}
}
void a2(int x,int y)
{ int a,b,c,d,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3;
a=(x)-(50/(sqrt(2)));b=(y-110)+(50/(sqrt(2)));c=429-(50/(sqrt(2)));d=(289)+(50/(sqrt(2)));
setcolor(15);
line(a,b,c,d);
a1=(x)-(100/(sqrt(2)));b1=(y-110)+(100/(sqrt(2)));c1=429-(100/(sqrt(2)));d1=(289)+(100/(sqrt(2)));
setcolor(15);
line(a1,b1,c1,d1);
a2=(x)+(50/(sqrt(2)));b2=(y-110)+(50/(sqrt(2)));c2=209+(50/(sqrt(2)));d2=(289)+(50/(sqrt(2)));
setcolor(15);
line(a2,b2,c2,d2);
a3=(x)+(100/(sqrt(2)));b3=(y-110)+(100/(sqrt(2)));c3=209+(100/(sqrt(2)));d3=(289)+(100/(sqrt(2)));
setcolor(15);
line(a3,b3,c3,d3);
setcolor(15);
line(x,y-110,x,y-260);
line(x-110,y,x-110,y-150);
line(x+110,y,x+110,y-150);
line(x+110,y-150,x,y-260);
line(x,y-260,x-110,y-150);
}
void a3(int x, int y)
{ for(int i1=0;i1<110;i1++)
{
line(x,y-110-1,x,y-260+1);
setcolor(4);
x++;y++;
} }
void a4(int x, int y)
{ int a2, b2, c2, d2,a1,b1,c1,d1,a3,b3,c3,d3;
a2=(x)+(50/(sqrt(2)));b2=(y-110)+(50/(sqrt(2)));c2=(x)+(50/(sqrt(2)));d2=(y-110)+(50/(sqrt(2)))-150 ;
setcolor(15);
line(a2,b2,c2,d2);
a1=(x)+(100/(sqrt(2)));b1=(y-110)+(100/(sqrt(2)));c1=(x)+(100/(sqrt(2)));d1=(y-110)+(100/(sqrt(2)))-150 ;
setcolor(15);
line(a1,b1,c1,d1);
a3=(x);b3=(y-160);c3=(x+110);d3=(y-50) ;
setcolor(15);
line(a3,b3,c3,d3);
a3=(x);b3=(y-160-50);c3=(x+110);d3=(y-100) ;
setcolor(15);
line(a3,b3,c3,d3);
}
void a5(int x, int y)
{ for(int i1=0;i1<110;i1++)
{
line(x,y-110-1,x,y-260+1);
setcolor(3);
x--;y++;
} }
void a6(int x, int y)
{ int a2, b2, c2, d2,a1,b1,c1,d1,a3,b3,c3,d3;
a2=(x)-(50/(sqrt(2)));b2=(y-110)+(50/(sqrt(2)));c2=(x)-(50/(sqrt(2)));d2=(y-110)+(50/(sqrt(2)))-150 ;
setcolor(15);
line(a2,b2,c2,d2);
a1=(x)-(100/(sqrt(2)));b1=(y-110)+(100/(sqrt(2)));c1=(x)-(100/(sqrt(2)));d1=(y-110)+(100/(sqrt(2)))-150 ;
setcolor(15);
line(a1,b1,c1,d1);
a3=(x);b3=(y-160);c3=(x-110);d3=(y-50) ;
setcolor(15);
line(a3,b3,c3,d3);
a3=(x);b3=(y-160-50);c3=(x-110);d3=(y-100) ;
setcolor(15);
line(a3,b3,c3,d3);
settextstyle( 1 ,0,5);
setcolor(0);
outtextxy(x-10,y-100,"V");
settextstyle( 7 ,0,5);
setcolor(0);
outtextxy(x-85,y-20,"I S ");
outtextxy(x-10,y+50,"U");
settextstyle( 1 ,0,3);
setcolor(6);
outtextxy(x+10,y-240,"s");
outtextxy(x+50,y-150,"A");
outtextxy(x+90,y-60,"I");
setcolor(9);
outtextxy(x-60,y-200,"G");
outtextxy(x-100,y-110,"u");
outtextxy(x-60,y-140,"d");
outtextxy(x-20,y-185,"d");
outtextxy(x-60,y-90,"i");
settextstyle( 1 ,0,1);
setcolor(14);
outtextxy(x-45,y-45,"he");
outtextxy(x+20,y-50,"MAN");
outtextxy(x-45,y+15,"T");
outtextxy(x+35,y+15,"H");
while(!kbhit())
{
setcolor(rand());
settextstyle(1,0,5);
outtextxy(0,y,"VISU");
setcolor(rand()+2);
outtextxy(80,y-70,"VISU");
}
//for(int i=0;i<90;i++)
// {
sound(240);
// sound(12*random(100));
delay(1090) ;
nosound();
// }
setcolor(15);
}
};
void main()
{
int a=DETECT,b;int x,y,p,q;
initgraph(&a,&b,"c:\\turboc3\\bgi");
x=getmaxx()/2;
y=50+getmaxy()/2;
visu v;
v.a1(x,y);
v.a2(x,y);
v.a3(x,y);
v.a4(x,y);
v.a5(x,y);
v.a6(x,y);
getch();
}
No comments:
Post a Comment