During input validation, how would one decipher between even and odd numbers? I have to write a program that allows an individual to select numbers between 2-14, excluding odds. Here is a snippet from that code line:
if (usersel < 2 || usersel >14)
cout << "Invalid input. Please try again.";
What would I place in the third or comparison to weed out the odd numbers?
Thank you for taking the time to read this.
if (usersel < 2 || usersel >14)
cout << "Invalid input. Please try again.";
What would I place in the third or comparison to weed out the odd numbers?
Thank you for taking the time to read this.
Comment