Arduino && and || in same if statement

Hi,
i have this code. But not work correct.

if (((a > c) && (a < e)) || ((a= c) && (b>= d)) || ((a= e) && (b< f))) {

}else{

}

i want to do “if red or orange or black”.

Look carefully at your comparison operators
= is for assignment
== is for comparison

:sob: Thank you UKHeliBob.

You can use the words “and” and “or” in place of “&&” and “||” to make your code easier to read.

I prefer to deal with those complex tests on different lines. IMHO it makes for greater clarity for the logic. And it allows me to check that each separate test is doing what I think it is doing.

…R