1. Engineering
  2. Computer Science
  3. problem 5 14 pts 1 pt each condition backward reasoning...

Question: problem 5 14 pts 1 pt each condition backward reasoning...

Question details

Problem 5 (14 pts, 1 pt each condition): Backward reasoning Find the weakest precondition of each code sequence by inserting the appropriate condition in each blank. Simplify your answers as much as possible. Assume all variables are ints Copy all code to your answer file and fill in the blanks. Answers must be expressed in the format wp(expression, condition) = precondition. Show all work. 1. 52 if (x 0) x=x+6; else x7 ) if (x > 4) x=x-3; ) else if (x < - 4) x=x+3; else x=x+1; [x > 0 4. x=y+2; z=x+1; if x 2 0) z = x; else z=x+1; {z!= 0 }

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution