if (a==b && a > 1 || a < 31 && b > 1 || b < 31)

cout << "true";

from what i can understand I've told the compiler that if

a is equal to b and a is greater than 1 or less than 31 and B is lso greater than 1 or less than 31 print true

however if you enter 33, 33 true is also displayed!! yet its out of the range i specified ...

anyone know why?

haha i solved it:

if (a==b && a > 1 && a < 31 && b > 1 && b < 31)

werid though since its only a guess!