1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
int coveredarray [3][3] = {{'?','?','?'},
{'?','?','?'},
{'?','?','?'}};
for(int row = 0; row < 3; row++)
{
for(int column = 0; column < 3; column++)
{
cout << coveredarray[row][column] << " ";
}
cout << endl;
}
//This is the Guess Array
int guessarray[3][3]; {{'?','?','?'},
{'?','?','?'},
{'?','?','?'}};
*srand(time(0)); // Initialize random number generator.
guessarray = (rand() % 3) ;
if (guessarray>1 && guessarray <9);
for(int row = 0; row <3; row++)
{ for(int column = 0; column <3; column++)
{ cout << guessarray[row][column];
}
}
}
| |