1. What is the value of x after each of these statements is encountered in a computer program, if x = 1 before the statement is reached?
a) if x + 2 = 3 then x := x + 1
Since the statement is true, it follows that after the command "if x + 2 = 3 then x := x + 1" the value of is equal to
Comments