mercredi 4 janvier 2017

Confusion with if statements and || and && not working as intented [on hold]

I'm trying to write this piece of code and simple idea is this

    if(!(a + 1 == b) ||
    (a - 1 == b)) &&
    ((b + 1 == c) ||
    (b - 1 == c))) {
        //Do Thing
}

But it doesn't seem to be working. Any help? Thanks!

Aucun commentaire:

Enregistrer un commentaire