You can use the !
operator to invert the condition:
if (!(x > y || p < q)) {
doSomeFunction();
}
Or simply rewrite the condition like this:
if (x <= y && p >= q) {
doSomeFunction();
}
Note: See De Morgan's laws for an explanation about why these two conditions are equivalent.