Thread
:
Setting Boundaries on Input for Numbers
View Single Post
xpi0t0s
Mentor
2May2011,13:47
Use multiple tests, so if you want to check if an input number is odd and between 32 and 45:
Code:
if ((inputNum%1) && (inputNum>=32) && (inputNum<=45)) printf("Valid!\n");