if (!(country == "USA"
&& state != "AK"
&& state != "HI"))
shipping_charge = 20.00;
|
!(A && B)
|
is the same as
|
!A || !B
|
|
!(A || B)
|
is the same as
|
!A && !B
|
meansstate != "AK" && state != "HI"
Applying DeMorgan's Law to the original expression yields!(state == "AK") && !(state == "HI")
!(state == "AK" || state == "HI")