/*
 * hw2 problem 3
 */
#include <stdio.h>
#include "simpio.h"

void main(){
  
  int i,months,runningTotal=1; /* we got one through mitosis */
  int monthlyBonus = 1; /* we find one in the park */
  double federalRate = 0.07; /* the value of squirrels */
  
  printf("For how many months would you like quality professional-grade projections? ");
  months=GetInteger();
 
  for(i=0;i<months;i++){
    /* we double the population each month by mitosis */
    runningTotal*=2;
    printf("Month %d:%5d squirrels bred + %d found  =%5d squirrels.  Cash value: $%6.2f\n",i+1,runningTotal,monthlyBonus,runningTotal+monthlyBonus,(runningTotal+monthlyBonus)*federalRate);
    /* and we find one in the park */
    runningTotal+=monthlyBonus;
  }

}

