Q37052323

while (i<n) i-i+ 1 return p; a) Find two non-trivial loop invariants that involve variables i, and p (and n which is a consta

while (i<n) i-i+ 1 return p; a) Find two non-trivial loop invariants that involve variables i, and p (and n which is a constant). They must be strong enough to get the post condition. Prove that each one is indeed a loop invariant. What does this program compute? Use the loop invariants and post condition to prove that this program indeed correctly computes what you specified before b) c) d) Show transcribed image

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.