/* PROOF OF CORRECTNESS: COMP(x,y): computation unknown That is, what does the function really compute? Note that you must also fill-in the POST condition. */ #include int comp(int x, int y) { int z, w; // PRE: y >= 0 z = x; w = y; // INVARIANT: while ( w > 0 ) { z = z + y; w = w - 1; } // INVARIANT: and EXIT: // POST: z = return z; } int main() { printf("comp(2,3)=%d\n",comp(2,3)); }