- #1
vb14
- 8
- 0
Hi Folks,
I am stack with following task:What is the value of x after each of these statements is encountered in a
computer program if x=2 before the statement is reached?
(i) if (6+2=9) then x:=x+1 .
(ii) if ((3+2=5) OR (2+3=3))then x:=x+1 .
(iii) if ((12+4=17) AND (4+5=9)) then x:=x+1.
Note 1 OR is ∨ AND is ^
Note 2 := is an assignment sign.Any help will be appreciated.
Thanks.
I am stack with following task:What is the value of x after each of these statements is encountered in a
computer program if x=2 before the statement is reached?
(i) if (6+2=9) then x:=x+1 .
(ii) if ((3+2=5) OR (2+3=3))then x:=x+1 .
(iii) if ((12+4=17) AND (4+5=9)) then x:=x+1.
Note 1 OR is ∨ AND is ^
Note 2 := is an assignment sign.Any help will be appreciated.
Thanks.