Similar questions 2 more →
Control Flow & Loop Tracing

Answer & solution
Answer: C (no official key was published)
1. For positive x,y, each iteration replaces the larger of m,n by its difference with the smaller. This preserves gcd(m,n), keeps both positive, and strictly decreases m+n until m=n.
2. The printed common value is gcd(x,y). This is not ordinary repeated subtraction for division: the roles of the two operands change.
3. Teaching check: For x=12,y=8, the pairs evolve (12,8)→(4,8)→(4,4), so the answer is 4. Every common divisor is preserved by subtracting one operand from the other. The positive decreasing sum proves termination, completing both partial correctness and progress.