Can I compare three variables like the following, instead of doing if((x==y)&&(y==z)&&(z=x))? [The if statement should execute if all three vari
if((x==y)&&(y==z)&&(z=x))
No. The equality check associates from the left and the logical result is compared as a number, so that the expression 2 == 2 == 1 parses as (2 == 2) == 1, which in turn gives 1 == 1 and results in 1, which is probably not what you want.
2 == 2 == 1
(2 == 2) == 1
1 == 1
1