Solution to x = 1 What is the value of x after each of these statements a. … - Sikademy
Author Image

Archangel Macsika

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) x=2 ; statement x+2=1+2=3 is true, so x:= x+1=1+1=2


b) x=1 ; 1+1\neq 3 and 2+2\neq 3, so x=1


c) x=2 ; 2+3=5 and 2+4=7, so x:=x+1=2


d) x=1 ; (x+1=2) is true, (x+2=3) is true, true XOR true is false, so x=1


e) x=2 ; 1 < 2, so x:= x+1=2


Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-5-stid-8-sqid-1362-qpid-1100