Stichwort logische Operatoren

if ( (Bedingung1) && (Bedingung2) = !(Bedingung3) )
{
...
}