/*
 * hw2 problem 2
 *
 */

#include <stdio.h>
#include "simpio.h"

void main(){
  
  int i,months,runningTotal=1; /* we got one to start with */
  int monthlyBonus = 1; /* the extra one we find in the park */
  
  printf("How many months before you get sick of this squirrel stuff? ");
  months=GetInteger();
 
  for(i=0;i<months;i++){
    /* we double the population each month by mitosis */
    runningTotal*=2;
    printf("End of month %d: You bred %d squirrels and found %d, for a total of %d.\n",i+1,runningTotal,monthlyBonus,runningTotal+monthlyBonus);
    /* and we find another in the park */
    runningTotal+=monthlyBonus;
  }
  printf("Congratualations on a successful harvest!  Too bad squirrels are worthless.\n");

}

