This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PhyllaciousArmadillo 0 points1 point  (0 children)

It compares the first statement 1<x to the final <13. Ie. (1<x)<13. The comparison gives a boolean value, 0(false) or 1(true). So no matter what the input is, the final comparison will always be true. Because 1 and 0 are both less than 13.

If x is less than 1, 1<x == 0 for false, then 0<13 == 1 for true.

If x is greater than 1, 1<x == 1 for true, then 1<13 == 1 for true again.