Reputation: 33
given lock situation:
I think I got this right but I need to be sure so I'm asking you guys if I made a mistake.
I got two possible outputs for variables "x" and "y" in this programm:
1. Lines 1.1 - 1.7: y = 5,
Lines 2.1 - 2.3: x = 15.
2. Lines 2.1 - 2.3: x = 11,
rest y = 25.
are there any other outputs in this exact situation?
Upvotes: 0
Views: 70
Reputation: 442
The lock block on the right had side can occur in one of three places:
The values of x
and y
for these three cases are
x = 11, y = 25
x = 11, y = 5
x = 15, y = 5
Upvotes: 1