#include <iostream>
#include <stdlib.h>
usingnamespace std;
int main ()
{
int index =0;
int temp;
int population;
int year;
int newpop;
cout << "Please enter the starting year" << endl; // This is to ask for the starting year
cin >> year;
cout << "Please enter the starting population for the deer." << endl; // This is to ask for the starting population
cin >> population;
while (index <10)
{
cout << "What was the lowest temperature in " << year << "?" << endl; // This asks forthe lowest temperature
cin >> temp;
{
if (temp <= 0)
{
newpop = (population) - (population * (.15));
cout <<"In spring " << year << " the deer population was " << newpop << endl;
}
elseif (0 <= temp) && (temp <= 25)
{
newpop = (population) - (population * (.1));
cout <<"In spring " << year << " the deer population was " << newpop << endl;
}
elseif (26 <= temp)&& (temp <= 30)
{
newpop = population;
cout <<"In spring " << year << " the deer population was " << newpop << endl;
}
elseif (31 <= temp) && (temp <= 35)
{
newpop = (population) + (population * (.12));
cout <<"In spring " << year << " the deer population was " << newpop << endl;
}
else;
{
newpop = (population) + (population * (.14));
cout <<"In spring " << year << " the deer population was " << newpop << endl;
}
population = newpop;
year++;
index++;
}
}
system ("PAUSE");
return 0;
}