// Program from Etter, pg 99. // Timber regrowth. A problem in timber management is to determine // how much of an area to leave uncut so that the harvested portion is // reforested withing a certain period. It is assumed that reforestation // takes place at a known rate per year depending on climate and soil // conditions. A reforstation equation expresses the growth as a function // of the amount of timber standing after harvesting 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 x 100 acres are // forested at the end of the first eyar. At the end of the second year, // the number of acres forested is 105 + 0.05 x 105, or 110.25 acres. // 9. Assume that there are 14,000 acres with 2,500 acres uncut and // that the reforestation rate is 0.02. Print a table showing the // number of acres reforested at the end of each year, for a total // of 20 years. #include #include int main () { double Acres; Acres = 2500; cout << "Year Acres" << endl; for ( int i=1; i<=20; i++) { Acres = Acres + 0.02 * Acres; cout << setw( 3 ) << i << " " << setprecision( 6 ) << Acres << endl; } return 0; }