CS 201 |
Mathematical Foundations of Computer Science |
This test is in-class, open-book, open-notes; total time is 50 minutes.
There are 4 questions, each worth the same number of points.
z <- x w <- y while w > 0 do z-- w-- return zVerify that it computes z=x-y by asserting and proving a suitable loop invariant.