I need to validate the numbers 1-16 within the given array. Any numbers that are duplicate or are outside of the range need to be outputted. While if all numbers 1-16 are inputted only once then the boolean value is true.

The numbers for the array theSquare are inputted previous to this function. So assume some generic array of numbers have been inputted.

NEED HELP QUICK:

bool validateRange(int theSquare [][4], const int numRows, const int magicvalue)

{ bool good = true;int i, j;

cout << "RANG: ";

for (i = 0; i<4; i++)

for (j=0;j<4;j++)

{

if (theSquare*[j]<1 || theSquare [j] >16)*

{good = false;

cout << theSquare[j] <1 || theSquare[j] > 16; }}

if (good == true)

{cout <<"VALID" << endl;

}

else

{

cout << endl;

}

return good;

}