11. Generalization


#1

How come this boolean statement is false? ( 3 >= 3 && !(true || true) ) Can someone explain it to me. I got trouble understanding precedences. Hehehe Thanks. :smile:


#2

3 >= 3 && !(true || true)

3 >= 3 is true. true || true is also true (or operator returns true when at least one operand is true). So we have:

true && !true

Not true means false, so !true is false.

true && false

This returns false, because and operator returns true only if both operands are true.


#3

Thanks dude. appreciate the quick reply :))


#4

You're very welcome :smile:


#5

My Boolean expression is false still error !
send me the actual solution