Given a 7x4 array generate four random numbers from the array with no repetition.
I can already generate four random numbers the problem is the repetition part.
Here's my code so far
int f[4];
int s[4];
for( i = 0; i < 4; i++)
{
// use as index for array a
f[i] = rand() % 7;
s[i] = rand() % 4;
cout << a[f[i]][s[i]] << "\n";
}
Any suggestions?