Solution Found!
You want your program to execute statement 1 when A is
Chapter 1, Problem 38(choose chapter or problem)
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.