Search for question
Question

3. Consider the following algorithm segment:

if x.y > 0 then do y := 3. x

x := x + 1 end do

z :=x.y

Find the value of z if prior to execution x and y have the

values given below.

a. x = 2, y =3 b.x = 1, y = 1

Fig: 1