int fox_pop; int geese_pop; int next_fox_pop; int next_geese_pop; int n; //Year number ... //0. Prime the loop n = 0; //Get fox_pop and geese_pop from the user for year 0 //Calculate the poplulations year by year until you get to total years. while (n <= total_years) { //Invariant: fox_pop and geese_pop are correct populations for year n // 1. Print the fox_pop and geese_pop if year is divisible by PRINT_FREQ //Assert: At this point, invariant is still true // 2. Calulate next years populations // (next_fox_pop and next_geese_pop) //Assert: Invariant is still true //Assert: next_fox_pop and next_geese_pop are populations for year n+1 // 3. Copy from next_fox_pop into fox_pop and // from next_geese_pop into geese_pop. //Assert: Invariant is not true at this point. //Assert: fox_pop and geese_pop are correct populations for year n+1 // 4. Increment the year ++n; //Invariant: fox_pop and geese_pop are correct populations for year n }