need help with logics

hello evryone!
i`m a bit confused with the next thing. So i have x and y coords. I need do do an IF expression when both conditions are performed. Condition for X is when its in a range from 0,00 to 100,00 or over 230,00 and at the same time Y is in the range from 0,00 to 20,00 or over 180 then do {}

i`ve made it like

if (x<=100 || x>=230 && (y>=180 || y<20))

{
}

But you know its not working lika a charm...

Maybe there is a better solution for such logic like using an array? Im a newbie so don kick me too much))) Thanks guys!

I think you are close try

if ((x<=100 || x>=230) && (y>=180 || y<20))

Thread moved as requested.