Compute the weakest precondition for each of the following selection constructs and their postconditions:
a. if (a == b)
b = 2 * a + 1
else
b = 2 * a;
{b > 1}
b. if (x < y)
x = x + 1
else
x = 3 * x
{x<0}
c. if (x > y)
y = 2 * x + 1
else
y = 3 * x - 1;
{y > 3}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.