===========================================================================
CODING
#include<all.h>
void main()
{
clrscr();
int a[80][80],i,j,x,y,Y,t,k,l,theta,theta1,Y1;
randomize();
for(k=0,theta=0,theta1=0;k<=50;k++)
{
for(i=0;i<=23;i++,theta+=30,theta1-=30)
{
for(j=0;j<=79;j++)
{
if(j+k<=79)
l=k+j;
else
l=k+j-59;
switch(l)
{
case 0:
t=15;
break;
case 1:
t=13;
break;
case 2:
t=5;
break;
case 3:
t=1;
break;
case 4:
t=9;
break;
case 5:
t=11;
break;
case 6:
t=3;
break;
case 7:
t=2;
break;
case 8:
t=10;
break;
case 9:
t=14;
break;
case 10:
t=6;
break;
case 11:
t=12;
break;
case 12:
t=4;
break;
case 13:
t=7;
break;
case 14:
t=8;
break;
case 15:
t=0;
break;
case 16:
t=7;
break;
case 17:
t=4;
break;
case 18:
t=12;
break;
case 19:
t=6;
break;
case 20:
t=14;
break;
case 21:
t=10;
break;
case 22:
t=2;
break;
case 23:
t=3;
break;
case 24:
t=11;
break;
case 25:
t=9;
break;
case 26:
t=1;
break;
case 27:
t=5;
break;
case 28:
t=13;
break;
case 29:
t=15;
break;
case 30:
t=13;
break;
case 31:
t=5;
break;
case 32:
t=1;
break;
case 33:
t=9;
break;
case 34:
t=11;
break;
case 35:
t=3;
break;
case 36:
t=2;
break;
case 37:
t=10;
break;
case 38:
t=14;
break;
case 39:
t=6;
break;
case 40:
t=12;
break;
case 41:
t=4;
break;
case 42:
t=7;
break;
case 43:
t=8;
break;
case 44:
t=0;
break;
case 45:
t=8;
break;
case 46:
t=7;
break;
case 47:
t=4;
break;
case 48:
t=12;
break;
case 49:
t=6;
break;
case 50:
t=14;
break;
case 51:
t=10;
break;
case 52:
t=2;
break;
case 53:
t=3;
break;
case 54:
t=11;
break;
case 55:
t=9;
break;
case 56:
t=1;
break;
case 57:
t=5;
break;
case 58:
t=13;
break;
case 59:
t=15;
break;
case 60:
t=13;
break;
case 61:
t=5;
break;
case 62:
t=1;
break;
case 63:
t=9;
break;
case 64:
t=11;
break;
case 65:
t=3;
break;
case 66:
t=2;
break;
case 67:
t=10;
break;
case 68:
t=14;
break;
case 69:
t=6;
break;
case 70:
t=12;
break;
case 71:
t=4;
break;
case 72:
t=7;
break;
case 73:
t=8;
break;
case 74:
t=0;
break;
case 75:
t=8;
break;
case 76:
t=7;
break;
case 77:
t=4;
break;
case 78:
t=12;
break;
case 79:
t=6;
break;
}
// t=random(16);
/* if(i==12)
{
a[i][j]=0;
}
else if(i==13)
{
else */
a[i][j]=t;
}
}
for(i=0,y=1,t=0;i<=23;i++,y++,t++)
{
for(j=0,x=1;j<=79;j++,x++)
{
gotoxy(x,y);
textcolor(a[i][j]);
cprintf("þ");
}
}
// delay(200);
}
getch();
}
CODING
#include<all.h>
void main()
{
clrscr();
int a[80][80],i,j,x,y,Y,t,k,l,theta,theta1,Y1;
randomize();
for(k=0,theta=0,theta1=0;k<=50;k++)
{
for(i=0;i<=23;i++,theta+=30,theta1-=30)
{
for(j=0;j<=79;j++)
{
if(j+k<=79)
l=k+j;
else
l=k+j-59;
switch(l)
{
case 0:
t=15;
break;
case 1:
t=13;
break;
case 2:
t=5;
break;
case 3:
t=1;
break;
case 4:
t=9;
break;
case 5:
t=11;
break;
case 6:
t=3;
break;
case 7:
t=2;
break;
case 8:
t=10;
break;
case 9:
t=14;
break;
case 10:
t=6;
break;
case 11:
t=12;
break;
case 12:
t=4;
break;
case 13:
t=7;
break;
case 14:
t=8;
break;
case 15:
t=0;
break;
case 16:
t=7;
break;
case 17:
t=4;
break;
case 18:
t=12;
break;
case 19:
t=6;
break;
case 20:
t=14;
break;
case 21:
t=10;
break;
case 22:
t=2;
break;
case 23:
t=3;
break;
case 24:
t=11;
break;
case 25:
t=9;
break;
case 26:
t=1;
break;
case 27:
t=5;
break;
case 28:
t=13;
break;
case 29:
t=15;
break;
case 30:
t=13;
break;
case 31:
t=5;
break;
case 32:
t=1;
break;
case 33:
t=9;
break;
case 34:
t=11;
break;
case 35:
t=3;
break;
case 36:
t=2;
break;
case 37:
t=10;
break;
case 38:
t=14;
break;
case 39:
t=6;
break;
case 40:
t=12;
break;
case 41:
t=4;
break;
case 42:
t=7;
break;
case 43:
t=8;
break;
case 44:
t=0;
break;
case 45:
t=8;
break;
case 46:
t=7;
break;
case 47:
t=4;
break;
case 48:
t=12;
break;
case 49:
t=6;
break;
case 50:
t=14;
break;
case 51:
t=10;
break;
case 52:
t=2;
break;
case 53:
t=3;
break;
case 54:
t=11;
break;
case 55:
t=9;
break;
case 56:
t=1;
break;
case 57:
t=5;
break;
case 58:
t=13;
break;
case 59:
t=15;
break;
case 60:
t=13;
break;
case 61:
t=5;
break;
case 62:
t=1;
break;
case 63:
t=9;
break;
case 64:
t=11;
break;
case 65:
t=3;
break;
case 66:
t=2;
break;
case 67:
t=10;
break;
case 68:
t=14;
break;
case 69:
t=6;
break;
case 70:
t=12;
break;
case 71:
t=4;
break;
case 72:
t=7;
break;
case 73:
t=8;
break;
case 74:
t=0;
break;
case 75:
t=8;
break;
case 76:
t=7;
break;
case 77:
t=4;
break;
case 78:
t=12;
break;
case 79:
t=6;
break;
}
// t=random(16);
/* if(i==12)
{
a[i][j]=0;
}
else if(i==13)
{
else */
a[i][j]=t;
}
}
for(i=0,y=1,t=0;i<=23;i++,y++,t++)
{
for(j=0,x=1;j<=79;j++,x++)
{
gotoxy(x,y);
textcolor(a[i][j]);
cprintf("þ");
}
}
// delay(200);
}
getch();
}
===========================================================================
No comments:
Post a Comment