Name: Anonymous 2011-09-03 10:01
Is it not possible to use
if(0<x<10){}
or do you have to use
if(x>0&&x<10){}
?
if(0<x<10){}
or do you have to use
if(x>0&&x<10){}
?
0 < x will evaluate to 0 or 1, so you get 1 < 10. This is assuming that the language converts true and false to 1 or 0.