You want your program to execute statement 1 when A is

Chapter 1, Problem 38

(choose chapter or problem)

Get Unlimited Answers
QUESTION:

You want your program to execute statement 1 when A is false, B is false, and C is true, and to execute statement 2 otherwise. You wrote if not(A and B) and C then statement 1 else statement 2 end if Does this do what you want?

Questions & Answers

QUESTION:

You want your program to execute statement 1 when A is false, B is false, and C is true, and to execute statement 2 otherwise. You wrote if not(A and B) and C then statement 1 else statement 2 end if Does this do what you want?

ANSWER:

Step 1 of 2

Consider the program given,

if not( and ) and  then

statement 1

else

statement 2

end if

The condition in the if statement is “not( and ) and ”. the condition “not( and )” will be true when “ and ” is false. The condition “ and ” is false when both  and  are false; also, either  or  is false, which should not be considered in this case. That means the condition will be true in the case that “either  or  is false”. That is not needed.

 So the condition written in the given code is wrong.

Add to cart


Study Tools You Might Need

Not The Solution You Need? Search for Your Answer Here:

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back