A problem in timber management is to determine how much of an area to leave uncut so that the harvested area is reforested in a certain period. It is assumed the reforestation takes place at a known rate per year, depending on climate and soil conditions.

A reforestation equation expresses this growth as a function of the amount of timber standing and the reforestation rate. For example, if 100 acres are left standing after harvesting and the reforestation rate is 0.05, then 100+0.05 *100 or 105 acres can be reforested at the end of the first year. If nothing is harvested, then at the end of the second year, the number of acres is 105+0.05*105 or 110.25 acres.

1. Prompt the user for the following inputs:
a. Total Acres
b. Acres Uncut
c. Reforestation Rate
d. Regrowth Period (in years)
2. Prompt the user to select one of the following calculation types:
a. Determine acres that can be harvested, given a regrowth period.
b. Determine regrowth period, given the acres to be harvested.
c. The program shall not allow the acres uncut to be greater than the total number of acres. Verify this both at the user input and during the calculations. An infinite amount of time cannot yield and infinite amount of wood.

3. Print to the screen a table that shows the following:a. Year
b. Reforestation rate
c. Acres Reforested (i.e. ready for harvest)

1 answer

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <iostream>

int main()

{

/* Declare and initialize variables. */

int year=1 ;

double Acres = 14000, uncut = 2500, Regrowth_rate = .02;

double reforest = 0;

while(year<=20)

{

uncut = uncut + (uncut*Regrowth_rate); // calculate growth

cout<< year <<"\t" << uncut << endl;

year++;

}

return 0;

}