x = 1 What is the value of x after each of these statements a. if x+2=3 then x:=x + 1 b. if (x+1=3) OR (2x+2=3) then x:=x+1 c. if (2x +3=5) AND (3x +4= 7) then x= x + 1 d. if (x+1=2) XOR (x+2=3) then x:=x+1 e. if x < 2 then x:=x + 1
The Answer to the Question
is below this banner.
Can't find a solution anywhere?
NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?
Get the Answers Now!You will get a detailed answer to your question or assignment in the shortest time possible.
Here's the Solution to this Question
a) ; statement x+2=1+2=3 is true, so x:= x+1=1+1=2
b) ; 1+1 3 and 2+2 3, so x=1
c) ; 2+3=5 and 2+4=7, so x:=x+1=2
d) ; (x+1=2) is true, (x+2=3) is true, true XOR true is false, so x=1
e) ; 1 < 2, so x:= x+1=2