Answer:
m' + n' = m + n + 2
Step-by-step explanation:
We are told that m + n is odd before entry into the loop. So let, P(q) be m + n is even on qth iteration of the while loop
Our basis step will be q = 0.
So, let P(k) be true and we can say that m + n is odd on the kth iteration of the while loop
Now, we need to prove that P(k + 1) is true.
Thus, on the (k + 1)th iteration, m is increased by 4 and n is decreased by 2.
Let's call the new values m' and n'.
So, m' = m + 4 and n' = n - 2
Thus, m' + n' = m + 4 + n - 2 = m + n + 2