That's the whole point it looks when it is even. Because you wanted odd for input. You already have the 1 -51 error check also but anyways it would look something like
1 2 3 4 5 6 7
do
{
cout << "Please enter an odd integer( 1 - 51 ): ";
cin >> N;
if( N < 1 || N > 51 || N % 2 == 0 ) //less than 1 , more than 51 or even
cout << "Invalid number." << endl;
} while( N < 1 || N > 51 || N % 2 == 0 ); //less than 1 greater than 51 or even