===========================================================================
CODING
#include<all.h>
void main()
{
clrscr();
first();
second();
randomize();
int i,c,y,a,a1,a2,a3,a4,a5,a6,a7,a8,a9,b1,b2,b3,b4,b5,b6,b7,b8,b9,l,j,check1=0,check2=0,check3=0,check4=0,check5=0,check6=0,check7=0,check8=0,checku1=0,checku2=0,checku3=0,checku4=0,checku5=0,checku6=0,checku7=0,checku8=0,u,g;
textcolor(10);
gotoxy(20,1);
cprintf("USER");
textcolor(YELLOW);
gotoxy(37,1);
cprintf("BINGO!");
textcolor(10);
gotoxy(59,1);
cprintf("GIDEON");
a1=random(20)+1;
label2:
a2=random(20)+1;
if(a2==a1)
goto label2;
label3:
a3=random(20)+1;
if(a3==a2 || a3==a1)
goto label3;
label4:
a4=random(20)+1;
if(a4==a2 || a4==a1 || a4==a3)
goto label4;
label5:
a5=random(20)+1;
if(a5==a2 || a5==a1 || a5==a3 || a5==a4)
goto label5;
label6:
a6=random(20)+1;
if(a6==a2 || a6==a1 || a6==a4 || a6==a5 || a6==a3)
goto label6;
label7:
a7=random(20)+1;
if(a7==a2 || a7==a1 || a7==a6 || a7==a5 || a7==a4 || a7==a3)
goto label7;
label8:
a8=random(20)+1;
if(a8==a2 || a8==a1 || a8==a7 || a8==a6 || a8==a5 || a8==a4 || a8==a3)
goto label8;
label9:
a9=random(20)+1;
if(a9==a2 || a9==a1 || a9==a7 || a9==a6 || a9==a5 || a9==a4 || a9==a8 || a9==a3)
goto label9;
b1=random(20)+1;
labell2:
b2=random(20)+1;
if(b2==b1)
goto labell2;
labell3:
b3=random(20)+1;
if(b3==b2 || b3==b1)
goto labell3;
labell4:
b4=random(20)+1;
if(b4==b2 || b4==b1 || b4==b3)
goto labell4;
labell5:
b5=random(20)+1;
if(b5==b2 || b5==b1 || b5==b3 || b5==b4)
goto labell5;
labell6:
b6=random(20)+1;
if(b6==b2 || b6==b1 || b6==b4 || b6==b5 || b6==b3)
goto labell6;
labell7:
b7=random(20)+1;
if(b7==b2 || b7==b1 || b7==b6 || b7==b5 || b7==b4 || b7==b3)
goto labell7;
labell8:
b8=random(20)+1;
if(b8==b2 || b8==b1 || b8==b7 || b8==b6 || b8==b5 || b8==b4 || b8==b3)
goto labell8;
labell9:
b9=random(20)+1;
if(b9==b2 || b9==b1 || b9==b7 || b9==b6 || b9==b5 || b9==b4 || b9==b8 || b9==b3)
goto labell9;
gotoxy(14,3);
cprintf("ÕÍÍÍÍÑÍÍÍÍÑÍÍÍ͸");
gotoxy(14,4);
cprintf("³ %2d ³ %2d ³ %2d ³",a1,a2,a3);
gotoxy(14,5);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(14,6);
cprintf("³ %2d ³ %2d ³ %2d ³",a4,a5,a6);
gotoxy(14,7);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(14,8);
cprintf("³ %2d ³ %2d ³ %2d ³",a7,a8,a9);
gotoxy(14,9);
cprintf("ÔÍÍÍÍÏÍÍÍÍÏÍÍÍ;");
gotoxy(54,3);
cprintf("ÕÍÍÍÍÑÍÍÍÍÑÍÍÍ͸");
gotoxy(54,4);
cprintf("³ %2d ³ %2d ³ %2d ³",b1,b2,b3);
gotoxy(54,5);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(54,6);
cprintf("³ %2d ³ %2d ³ %2d ³",b4,b5,b6);
gotoxy(54,7);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(54,8);
cprintf("³ %2d ³ %2d ³ %2d ³",b7,b8,b9);
gotoxy(54,9);
cprintf("ÔÍÍÍÍÏÍÍÍÍÏÍÍÍ;");
for(g=0,u=0,i=1,y=0,l=0;(a1!=0 || a2!=0 || a3!=0 || a4!=0 || a5!=0 || a6!=0 || a7!=0 || a8!=0 || a9!=0) && (b1!=0 || b2!=0 || b3!=0 || b4!=0 || b5!=0 || b6!=0 || b7!=0 || b8!=0 || b9!=0);i++,y=0,l=0,textcolor(10))
{
if(i%2!=0)
{
labelu:
gotoxy(22,10+i);
textcolor(WHITE);
cscanf("%d",&c);
textcolor(12);
if(a1==c)
{
gotoxy(16,4);
cprintf("%2d",a1);
a1=0;
}
else if(a2==c)
{
gotoxy(21,4);
cprintf("%2d",a2);
a2=0;
}
else if(a3==c)
{
gotoxy(26,4);
cprintf("%2d",a3);
a3=0;
}
else if(a4==c)
{
gotoxy(16,6);
cprintf("%2d",a4);
a4=0;
}
else if(a5==c)
{
gotoxy(21,6);
cprintf("%2d",a5);
a5=0;
}
else if(a6==c)
{
gotoxy(26,6);
cprintf("%2d",a6);
a6=0;
}
else if(a7==c)
{
gotoxy(16,8);
cprintf("%2d",a7);
a7=0;
}
else if(a8==c)
{
gotoxy(21,8);
cprintf("%2d",a8);
a8=0;
}
else if(a9==c)
{
gotoxy(26,8);
cprintf("%2d",a9);
a9=0;
}
else
{
gotoxy(21,10+i);
cprintf(" ");
goto labelu;
}
if(b1==c)
{
gotoxy(56,4);
cprintf("%2d",b1);
b1=0;
}
else if(b2==c)
{
gotoxy(61,4);
cprintf("%2d",b2);
b2=0;
}
else if(b3==c)
{
gotoxy(66,4);
cprintf("%2d",b3);
b3=0;
}
else if(b4==c)
{
gotoxy(56,6);
cprintf("%2d",b4);
b4=0;
}
else if(b5==c)
{
gotoxy(61,6);
cprintf("%2d",b5);
b5=0;
}
else if(b6==c)
{
gotoxy(66,6);
cprintf("%2d",b6);
b6=0;
}
else if(b7==c)
{
gotoxy(56,8);
cprintf("%2d",b7);
b7=0;
}
else if(b8==c)
{
gotoxy(61,8);
cprintf("%2d",b8);
b8=0;
}
else if(b9==c)
{
gotoxy(66,8);
cprintf("%2d",b9);
b9=0;
}
}
else
{
gotoxy(49,2);
textcolor(WHITE);
cprintf("So Let me Think, Wait ");
for(j=1;j<=20;j++)
{
if(j%2==0)
cprintf("\b\\");
else
cprintf("\b\/");
sound(j*100);
delay(300);
}
nosound();
gotoxy(49,2);
cprintf(" ");
if(b1==0 && b3==0 && b2!=0)
c=b2;
else if(b3==0 && b2==0 && b1!=0)
c=b1;
else if(b1==0 && b2==0 && b3!=0)
c=b3;
else if(b4==0 && b6==0 && b5!=0)
c=b5;
else if(b6==0 && b5==0 && b4!=0)
c=b4;
else if(b4==0 && b5==0 && b6!=0)
c=b6;
else if(b7==0 && b9==0 && b8!=0)
c=b8;
else if(b9==0 && b8==0 && b7!=0)
c=b7;
else if(b7==0 && b8==0 && b9!=0)
c=b9;
else if(b1==0 && b7==0 && b4!=0)
c=b4;
else if(b7==0 && b4==0 && b1!=0)
c=b1;
else if(b1==0 && b4==0 && b7!=0)
c=b7;
else if(b2==0 && b8==0 && b5!=0)
c=b5;
else if(b8==0 && b5==0 && b2!=0)
c=b2;
else if(b2==0 && b5==0 && b8!=0)
c=b8;
else if(b3==0 && b9==0 && b6!=0)
c=b6;
else if(b9==0 && b6==0 && b3!=0)
c=b3;
else if(b3==0 && b6==0 && b9!=0)
c=b9;
else if(b1==0 && b9==0 && b5!=0)
c=b5;
else if(b9==0 && b5==0 && b1!=0)
c=b1;
else if(b1==0 && b5==0 && b9!=0)
c=b9;
else if(b3==0 && b7==0 && b5!=0)
c=b5;
else if(b7==0 && b5==0 && b3!=0)
c=b3;
else if(b3==0 && b5==0 && b7!=0)
c=b7;
else
{
labelg:
c=random(9)+1;
switch(c)
{
case 1: c=b1;break;
case 2: c=b2;break;
case 3: c=b3;break;
case 4: c=b4;break;
case 5: c=b5;break;
case 6: c=b6;break;
case 7: c=b7;break;
case 8: c=b8;break;
case 9: c=b9;break;
}
if(c==0)
goto labelg;
}
gotoxy(62,9+i);
textcolor(WHITE);
cprintf("%d",c);
textcolor(12);
if(a1==c)
{
gotoxy(16,4);
cprintf("%2d",a1);
a1=0;
}
else if(a2==c)
{
gotoxy(21,4);
cprintf("%2d",a2);
a2=0;
}
else if(a3==c)
{
gotoxy(26,4);
cprintf("%2d",a3);
a3=0;
}
else if(a4==c)
{
gotoxy(16,6);
cprintf("%2d",a4);
a4=0;
}
else if(a5==c)
{
gotoxy(21,6);
cprintf("%2d",a5);
a5=0;
}
else if(a6==c)
{
gotoxy(26,6);
cprintf("%2d",a6);
a6=0;
}
else if(a7==c)
{
gotoxy(16,8);
cprintf("%2d",a7);
a7=0;
}
else if(a8==c)
{
gotoxy(21,8);
cprintf("%2d",a8);
a8=0;
}
else if(a9==c)
{
gotoxy(26,8);
cprintf("%2d",a9);
a9=0;
}
if(b1==c)
{
gotoxy(56,4);
cprintf("%2d",b1);
b1=0;
}
else if(b2==c)
{
gotoxy(61,4);
cprintf("%2d",b2);
b2=0;
}
else if(b3==c)
{
gotoxy(66,4);
cprintf("%2d",b3);
b3=0;
}
else if(b4==c)
{
gotoxy(56,6);
cprintf("%2d",b4);
b4=0;
}
else if(b5==c)
{
gotoxy(61,6);
cprintf("%2d",b5);
b5=0;
}
else if(b6==c)
{
gotoxy(66,6);
cprintf("%2d",b6);
b6=0;
}
else if(b7==c)
{
gotoxy(56,8);
cprintf("%2d",b7);
b7=0;
}
else if(b8==c)
{
gotoxy(61,8);
cprintf("%2d",b8);
b8=0;
}
else if(b9==c)
{
gotoxy(66,8);
cprintf("%2d",b9);
b9=0;
}
else
{
gotoxy(62,9+i);
cprintf(" ");
goto labelg;
}
}
if(b1==0 && b3==0 && b2==0)
{
y++;
if(check1!=0)
y--;
check1=1;
}
if(b4==0 && b6==0 && b5==0)
{
y++;
if(check2!=0)
y--;
check2=1;
}
if(b7==0 && b9==0 && b8==0)
{
y++;
if(check3!=0)
y--;
check3=1;
}
if(b1==0 && b7==0 && b4==0)
{
y++;
if(check4!=0)
y--;
check4=1;
}
if(b2==0 && b8==0 && b5==0)
{
y++;
if(check5!=0)
y--;
check5=1;
}
if(b3==0 && b9==0 && b6==0)
{
y++;
if(check6!=0)
y--;
check6=1;
}
if(b1==0 && b9==0 && b5==0)
{
y++;
if(check7!=0)
y--;
check7=1;
}
if(b3==0 && b7==0 && b5==0)
{
y++;
if(check8!=0)
y--;
check8=1;
}
if(y!=0)
{
for(j=1;j<=y;j++)
{
g++;
gotoxy(73,5+(g-1)*2);
cprintf("BINGO %d",g);
}
}
if(a1==0 && a3==0 && a2==0)
{
l++;
if(checku1!=0)
l--;
checku1=1;
}
if(a4==0 && a6==0 && a5==0)
{
l++;
if(checku2!=0)
l--;
checku2=1;
}
if(a7==0 && a9==0 && a8==0)
{
l++;
if(checku3!=0)
l--;
checku3=1;
}
if(a1==0 && a7==0 && a4==0)
{
l++;
if(checku4!=0)
l--;
checku4=1;
}
if(a2==0 && a8==0 && a5==0)
{
l++;
if(checku5!=0)
l--;
checku5=1;
}
if(a3==0 && a9==0 && a6==0)
{
l++;
if(checku6!=0)
l--;
checku6=1;
}
if(a1==0 && a9==0 && a5==0)
{
l++;
if(checku7!=0)
l--;
checku7=1;
}
if(a3==0 && a7==0 && a5==0)
{
l++;
if(checku8!=0)
l--;
checku8=1;
}
if(l!=0)
{
for(j=1;j<=l;j++)
{
u++;
gotoxy(5,5+(u-1)*2);
cprintf("BINGO %d",u);
}
}
}
sound(800);
if(u==g)
{
gotoxy(7,1);
textcolor(5+BLINK);
cprintf("(YOU WON!)");
gotoxy(68,1);
cprintf("(I WON!)");
}
else if(g>u)
{
gotoxy(68,1);
textcolor(5+BLINK);
cprintf("(I WON!)");
}
else if(u>g)
{
gotoxy(7,1);
textcolor(5+BLINK);
cprintf("(YOU WON!)");
}
delay(1000);
nosound();
getch();
getch();
}
CODING
#include<all.h>
void main()
{
clrscr();
first();
second();
randomize();
int i,c,y,a,a1,a2,a3,a4,a5,a6,a7,a8,a9,b1,b2,b3,b4,b5,b6,b7,b8,b9,l,j,check1=0,check2=0,check3=0,check4=0,check5=0,check6=0,check7=0,check8=0,checku1=0,checku2=0,checku3=0,checku4=0,checku5=0,checku6=0,checku7=0,checku8=0,u,g;
textcolor(10);
gotoxy(20,1);
cprintf("USER");
textcolor(YELLOW);
gotoxy(37,1);
cprintf("BINGO!");
textcolor(10);
gotoxy(59,1);
cprintf("GIDEON");
a1=random(20)+1;
label2:
a2=random(20)+1;
if(a2==a1)
goto label2;
label3:
a3=random(20)+1;
if(a3==a2 || a3==a1)
goto label3;
label4:
a4=random(20)+1;
if(a4==a2 || a4==a1 || a4==a3)
goto label4;
label5:
a5=random(20)+1;
if(a5==a2 || a5==a1 || a5==a3 || a5==a4)
goto label5;
label6:
a6=random(20)+1;
if(a6==a2 || a6==a1 || a6==a4 || a6==a5 || a6==a3)
goto label6;
label7:
a7=random(20)+1;
if(a7==a2 || a7==a1 || a7==a6 || a7==a5 || a7==a4 || a7==a3)
goto label7;
label8:
a8=random(20)+1;
if(a8==a2 || a8==a1 || a8==a7 || a8==a6 || a8==a5 || a8==a4 || a8==a3)
goto label8;
label9:
a9=random(20)+1;
if(a9==a2 || a9==a1 || a9==a7 || a9==a6 || a9==a5 || a9==a4 || a9==a8 || a9==a3)
goto label9;
b1=random(20)+1;
labell2:
b2=random(20)+1;
if(b2==b1)
goto labell2;
labell3:
b3=random(20)+1;
if(b3==b2 || b3==b1)
goto labell3;
labell4:
b4=random(20)+1;
if(b4==b2 || b4==b1 || b4==b3)
goto labell4;
labell5:
b5=random(20)+1;
if(b5==b2 || b5==b1 || b5==b3 || b5==b4)
goto labell5;
labell6:
b6=random(20)+1;
if(b6==b2 || b6==b1 || b6==b4 || b6==b5 || b6==b3)
goto labell6;
labell7:
b7=random(20)+1;
if(b7==b2 || b7==b1 || b7==b6 || b7==b5 || b7==b4 || b7==b3)
goto labell7;
labell8:
b8=random(20)+1;
if(b8==b2 || b8==b1 || b8==b7 || b8==b6 || b8==b5 || b8==b4 || b8==b3)
goto labell8;
labell9:
b9=random(20)+1;
if(b9==b2 || b9==b1 || b9==b7 || b9==b6 || b9==b5 || b9==b4 || b9==b8 || b9==b3)
goto labell9;
gotoxy(14,3);
cprintf("ÕÍÍÍÍÑÍÍÍÍÑÍÍÍ͸");
gotoxy(14,4);
cprintf("³ %2d ³ %2d ³ %2d ³",a1,a2,a3);
gotoxy(14,5);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(14,6);
cprintf("³ %2d ³ %2d ³ %2d ³",a4,a5,a6);
gotoxy(14,7);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(14,8);
cprintf("³ %2d ³ %2d ³ %2d ³",a7,a8,a9);
gotoxy(14,9);
cprintf("ÔÍÍÍÍÏÍÍÍÍÏÍÍÍ;");
gotoxy(54,3);
cprintf("ÕÍÍÍÍÑÍÍÍÍÑÍÍÍ͸");
gotoxy(54,4);
cprintf("³ %2d ³ %2d ³ %2d ³",b1,b2,b3);
gotoxy(54,5);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(54,6);
cprintf("³ %2d ³ %2d ³ %2d ³",b4,b5,b6);
gotoxy(54,7);
cprintf("ÆÍÍÍÍØÍÍÍÍØÍÍÍ͵");
gotoxy(54,8);
cprintf("³ %2d ³ %2d ³ %2d ³",b7,b8,b9);
gotoxy(54,9);
cprintf("ÔÍÍÍÍÏÍÍÍÍÏÍÍÍ;");
for(g=0,u=0,i=1,y=0,l=0;(a1!=0 || a2!=0 || a3!=0 || a4!=0 || a5!=0 || a6!=0 || a7!=0 || a8!=0 || a9!=0) && (b1!=0 || b2!=0 || b3!=0 || b4!=0 || b5!=0 || b6!=0 || b7!=0 || b8!=0 || b9!=0);i++,y=0,l=0,textcolor(10))
{
if(i%2!=0)
{
labelu:
gotoxy(22,10+i);
textcolor(WHITE);
cscanf("%d",&c);
textcolor(12);
if(a1==c)
{
gotoxy(16,4);
cprintf("%2d",a1);
a1=0;
}
else if(a2==c)
{
gotoxy(21,4);
cprintf("%2d",a2);
a2=0;
}
else if(a3==c)
{
gotoxy(26,4);
cprintf("%2d",a3);
a3=0;
}
else if(a4==c)
{
gotoxy(16,6);
cprintf("%2d",a4);
a4=0;
}
else if(a5==c)
{
gotoxy(21,6);
cprintf("%2d",a5);
a5=0;
}
else if(a6==c)
{
gotoxy(26,6);
cprintf("%2d",a6);
a6=0;
}
else if(a7==c)
{
gotoxy(16,8);
cprintf("%2d",a7);
a7=0;
}
else if(a8==c)
{
gotoxy(21,8);
cprintf("%2d",a8);
a8=0;
}
else if(a9==c)
{
gotoxy(26,8);
cprintf("%2d",a9);
a9=0;
}
else
{
gotoxy(21,10+i);
cprintf(" ");
goto labelu;
}
if(b1==c)
{
gotoxy(56,4);
cprintf("%2d",b1);
b1=0;
}
else if(b2==c)
{
gotoxy(61,4);
cprintf("%2d",b2);
b2=0;
}
else if(b3==c)
{
gotoxy(66,4);
cprintf("%2d",b3);
b3=0;
}
else if(b4==c)
{
gotoxy(56,6);
cprintf("%2d",b4);
b4=0;
}
else if(b5==c)
{
gotoxy(61,6);
cprintf("%2d",b5);
b5=0;
}
else if(b6==c)
{
gotoxy(66,6);
cprintf("%2d",b6);
b6=0;
}
else if(b7==c)
{
gotoxy(56,8);
cprintf("%2d",b7);
b7=0;
}
else if(b8==c)
{
gotoxy(61,8);
cprintf("%2d",b8);
b8=0;
}
else if(b9==c)
{
gotoxy(66,8);
cprintf("%2d",b9);
b9=0;
}
}
else
{
gotoxy(49,2);
textcolor(WHITE);
cprintf("So Let me Think, Wait ");
for(j=1;j<=20;j++)
{
if(j%2==0)
cprintf("\b\\");
else
cprintf("\b\/");
sound(j*100);
delay(300);
}
nosound();
gotoxy(49,2);
cprintf(" ");
if(b1==0 && b3==0 && b2!=0)
c=b2;
else if(b3==0 && b2==0 && b1!=0)
c=b1;
else if(b1==0 && b2==0 && b3!=0)
c=b3;
else if(b4==0 && b6==0 && b5!=0)
c=b5;
else if(b6==0 && b5==0 && b4!=0)
c=b4;
else if(b4==0 && b5==0 && b6!=0)
c=b6;
else if(b7==0 && b9==0 && b8!=0)
c=b8;
else if(b9==0 && b8==0 && b7!=0)
c=b7;
else if(b7==0 && b8==0 && b9!=0)
c=b9;
else if(b1==0 && b7==0 && b4!=0)
c=b4;
else if(b7==0 && b4==0 && b1!=0)
c=b1;
else if(b1==0 && b4==0 && b7!=0)
c=b7;
else if(b2==0 && b8==0 && b5!=0)
c=b5;
else if(b8==0 && b5==0 && b2!=0)
c=b2;
else if(b2==0 && b5==0 && b8!=0)
c=b8;
else if(b3==0 && b9==0 && b6!=0)
c=b6;
else if(b9==0 && b6==0 && b3!=0)
c=b3;
else if(b3==0 && b6==0 && b9!=0)
c=b9;
else if(b1==0 && b9==0 && b5!=0)
c=b5;
else if(b9==0 && b5==0 && b1!=0)
c=b1;
else if(b1==0 && b5==0 && b9!=0)
c=b9;
else if(b3==0 && b7==0 && b5!=0)
c=b5;
else if(b7==0 && b5==0 && b3!=0)
c=b3;
else if(b3==0 && b5==0 && b7!=0)
c=b7;
else
{
labelg:
c=random(9)+1;
switch(c)
{
case 1: c=b1;break;
case 2: c=b2;break;
case 3: c=b3;break;
case 4: c=b4;break;
case 5: c=b5;break;
case 6: c=b6;break;
case 7: c=b7;break;
case 8: c=b8;break;
case 9: c=b9;break;
}
if(c==0)
goto labelg;
}
gotoxy(62,9+i);
textcolor(WHITE);
cprintf("%d",c);
textcolor(12);
if(a1==c)
{
gotoxy(16,4);
cprintf("%2d",a1);
a1=0;
}
else if(a2==c)
{
gotoxy(21,4);
cprintf("%2d",a2);
a2=0;
}
else if(a3==c)
{
gotoxy(26,4);
cprintf("%2d",a3);
a3=0;
}
else if(a4==c)
{
gotoxy(16,6);
cprintf("%2d",a4);
a4=0;
}
else if(a5==c)
{
gotoxy(21,6);
cprintf("%2d",a5);
a5=0;
}
else if(a6==c)
{
gotoxy(26,6);
cprintf("%2d",a6);
a6=0;
}
else if(a7==c)
{
gotoxy(16,8);
cprintf("%2d",a7);
a7=0;
}
else if(a8==c)
{
gotoxy(21,8);
cprintf("%2d",a8);
a8=0;
}
else if(a9==c)
{
gotoxy(26,8);
cprintf("%2d",a9);
a9=0;
}
if(b1==c)
{
gotoxy(56,4);
cprintf("%2d",b1);
b1=0;
}
else if(b2==c)
{
gotoxy(61,4);
cprintf("%2d",b2);
b2=0;
}
else if(b3==c)
{
gotoxy(66,4);
cprintf("%2d",b3);
b3=0;
}
else if(b4==c)
{
gotoxy(56,6);
cprintf("%2d",b4);
b4=0;
}
else if(b5==c)
{
gotoxy(61,6);
cprintf("%2d",b5);
b5=0;
}
else if(b6==c)
{
gotoxy(66,6);
cprintf("%2d",b6);
b6=0;
}
else if(b7==c)
{
gotoxy(56,8);
cprintf("%2d",b7);
b7=0;
}
else if(b8==c)
{
gotoxy(61,8);
cprintf("%2d",b8);
b8=0;
}
else if(b9==c)
{
gotoxy(66,8);
cprintf("%2d",b9);
b9=0;
}
else
{
gotoxy(62,9+i);
cprintf(" ");
goto labelg;
}
}
if(b1==0 && b3==0 && b2==0)
{
y++;
if(check1!=0)
y--;
check1=1;
}
if(b4==0 && b6==0 && b5==0)
{
y++;
if(check2!=0)
y--;
check2=1;
}
if(b7==0 && b9==0 && b8==0)
{
y++;
if(check3!=0)
y--;
check3=1;
}
if(b1==0 && b7==0 && b4==0)
{
y++;
if(check4!=0)
y--;
check4=1;
}
if(b2==0 && b8==0 && b5==0)
{
y++;
if(check5!=0)
y--;
check5=1;
}
if(b3==0 && b9==0 && b6==0)
{
y++;
if(check6!=0)
y--;
check6=1;
}
if(b1==0 && b9==0 && b5==0)
{
y++;
if(check7!=0)
y--;
check7=1;
}
if(b3==0 && b7==0 && b5==0)
{
y++;
if(check8!=0)
y--;
check8=1;
}
if(y!=0)
{
for(j=1;j<=y;j++)
{
g++;
gotoxy(73,5+(g-1)*2);
cprintf("BINGO %d",g);
}
}
if(a1==0 && a3==0 && a2==0)
{
l++;
if(checku1!=0)
l--;
checku1=1;
}
if(a4==0 && a6==0 && a5==0)
{
l++;
if(checku2!=0)
l--;
checku2=1;
}
if(a7==0 && a9==0 && a8==0)
{
l++;
if(checku3!=0)
l--;
checku3=1;
}
if(a1==0 && a7==0 && a4==0)
{
l++;
if(checku4!=0)
l--;
checku4=1;
}
if(a2==0 && a8==0 && a5==0)
{
l++;
if(checku5!=0)
l--;
checku5=1;
}
if(a3==0 && a9==0 && a6==0)
{
l++;
if(checku6!=0)
l--;
checku6=1;
}
if(a1==0 && a9==0 && a5==0)
{
l++;
if(checku7!=0)
l--;
checku7=1;
}
if(a3==0 && a7==0 && a5==0)
{
l++;
if(checku8!=0)
l--;
checku8=1;
}
if(l!=0)
{
for(j=1;j<=l;j++)
{
u++;
gotoxy(5,5+(u-1)*2);
cprintf("BINGO %d",u);
}
}
}
sound(800);
if(u==g)
{
gotoxy(7,1);
textcolor(5+BLINK);
cprintf("(YOU WON!)");
gotoxy(68,1);
cprintf("(I WON!)");
}
else if(g>u)
{
gotoxy(68,1);
textcolor(5+BLINK);
cprintf("(I WON!)");
}
else if(u>g)
{
gotoxy(7,1);
textcolor(5+BLINK);
cprintf("(YOU WON!)");
}
delay(1000);
nosound();
getch();
getch();
}
===========================================================================
No comments:
Post a Comment