CSC 301 Grinnell College Fall, 2011
 
Analysis of Algorithms
 

Loop Invariants

List of problems and loop invariants

Problem: Read successive numbers from the keyboard, until a non-positive value is read, and finding the average of the positive values.

Five solutions in C

Reading on Pictorial Loop Invariants

Lab on Pictorial Loop Invariants