Hi all i am working on a memory game and i am having problems inputing the data so it checks if a 3rd number is pulled up to ignore it
thanks in advance
int card[6][6],total=0,value,test;
srand((unsigned)time(NULL));//randomize timer
for (int i=0;i<6;i++)
{
for (int j=0;j<6;j++)
{
value=rand()%18;//random
test=0;
card[i][j]=value;//sets the value
for (int x=0;x<6;x++)
{
for (int y=0;y<6;y++)//starts the check for doubles
{
if(value==card[x][y])
{
test++;
cout<<i<<endl;
}
if (test==3)
{
//need a code to stop for the 3rd one to be put in.
}
}
}
}
}