Question

Prove whether or not the program segment x≔3 z≔x-y+2 if y>0 then z≔z+3 else z≔2   ...

  1. Prove whether or not the program segment

x≔3

z≔x-y+2

if y>0 then

z≔z+3

else

z≔2

   is partially correct with respect to the initial assertion y=4 and the final assertion z=6

0 0
Add a comment Improve this question Transcribed image text
Answer #1


x = 3 Z = X-Y+2 if yyo then Z: - Z+3 else Z=2 For Y=4 x - 3 Z:= X - Y + 2 - 3- 4+2 - since Y=470 Z: - Z+3 . Z= 1+3 = 476 The

Add a comment
Know the answer?
Add Answer to:
Prove whether or not the program segment x≔3 z≔x-y+2 if y>0 then z≔z+3 else z≔2   ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT