===========================================================================
CODING
#include<all.h>
void main()
{
clrscr();
int i,q=1,x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,a1,a2,a3,a4,a5,a6,a7,t;
randomize();
do
{
a1=random(9);
x1=random(80);
a2=random(9);
x2=random(80);
a3=random(9);
x3=random(80);
a4=random(9);
x4=random(80);
a5=random(9);
x5=random(80);
a6=random(9);
x6=random(80);
a7=random(9);
x7=random(80);
for(y1=1,y2=5,y3=2,y4=4,y5=6,y6=8,y7=10;y7<=25;y1++,y2++,y3++,y4++,y5++,y6++,y7++)
{
t=random(15);
textcolor(t);
gotoxy(x1,y1);
cprintf("%d",a1);
gotoxy(x2,y2);
cprintf("%d",a2);
gotoxy(x3,y3);
cprintf("%d",a3);
gotoxy(x4,y4);
cprintf("%d",a4);
gotoxy(x5,y5);
cprintf("%d",a5);
gotoxy(x6,y6);
cprintf("%d",a6);
gotoxy(x7,y7);
cprintf("%d",a7);
delay(30);
gotoxy(x1,y1);
cprintf(" ");
gotoxy(x2,y2);
cprintf(" ");
gotoxy(x3,y3);
cprintf(" ");
gotoxy(x4,y4);
cprintf(" ");
gotoxy(x5,y5);
cprintf(" ");
gotoxy(x6,y6);
cprintf(" ");
gotoxy(x7,y7);
cprintf(" ");
}
q++;
}while(q<=50);
}
CODING
#include<all.h>
void main()
{
clrscr();
int i,q=1,x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7,a1,a2,a3,a4,a5,a6,a7,t;
randomize();
do
{
a1=random(9);
x1=random(80);
a2=random(9);
x2=random(80);
a3=random(9);
x3=random(80);
a4=random(9);
x4=random(80);
a5=random(9);
x5=random(80);
a6=random(9);
x6=random(80);
a7=random(9);
x7=random(80);
for(y1=1,y2=5,y3=2,y4=4,y5=6,y6=8,y7=10;y7<=25;y1++,y2++,y3++,y4++,y5++,y6++,y7++)
{
t=random(15);
textcolor(t);
gotoxy(x1,y1);
cprintf("%d",a1);
gotoxy(x2,y2);
cprintf("%d",a2);
gotoxy(x3,y3);
cprintf("%d",a3);
gotoxy(x4,y4);
cprintf("%d",a4);
gotoxy(x5,y5);
cprintf("%d",a5);
gotoxy(x6,y6);
cprintf("%d",a6);
gotoxy(x7,y7);
cprintf("%d",a7);
delay(30);
gotoxy(x1,y1);
cprintf(" ");
gotoxy(x2,y2);
cprintf(" ");
gotoxy(x3,y3);
cprintf(" ");
gotoxy(x4,y4);
cprintf(" ");
gotoxy(x5,y5);
cprintf(" ");
gotoxy(x6,y6);
cprintf(" ");
gotoxy(x7,y7);
cprintf(" ");
}
q++;
}while(q<=50);
}
===========================================================================
OUTPUT
No comments:
Post a Comment