kaylashea2229
kaylashea2229 kaylashea2229
  • 07-04-2017
  • Computers and Technology
contestada

is the expression a || b the same as a && !b

Respuesta :

SapphireMoon
SapphireMoon SapphireMoon
  • 07-04-2017
Most definitely not! A || B is A OR B, if A is true OR B is true, the statement will be true. A && !B is A AND !B, only if A is true AND B is false will the statement be true. With OR, B can be true and the statement will pass.
Answer Link
spartan1244 spartan1244
  • 07-04-2017
You could test it
case (1)
a =true, b=false
true || false    = true
true && !false = true
PASSED! 

a=false b= true
false || true     = true
false && !true = false
FAILED!

also try a=true, b =true

so the it is not the same
Answer Link

Otras preguntas

how do you write 3/2 in percentage
What two necessities did they use to build the pyramids?
what part of the brain keeps the heart beating?
The Calvin cycle: was named after an American biochemist does not require light energy to work produces glucose and water all of the above
{29, 29, 29, 28, 28, 27} What is the best measure of center for this data set? a .mean or median because there is no outlier b .median because there is an outli
Generalized vague or exaggerated claims particularly when asserted humorously
Which of the following public offices cannot be found in Bill Clinton's resume?
There are twenty different types of _____________ which join together in differing sequences and numbers to form different proteins.
Fidel Castro died in
how many grams of carbon disulfide will react with 2.14 moles of oxygen answer fast and will mark brainliest