Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

4. timberGrowth A problem in timber management is to determine how much of an ar

ID: 670411 • Letter: 4

Question

4. timberGrowth

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 that 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) = 105 acres are reforested at the end of the first year. At the end of the second year, the number of acres reforested is 105 + 0.05(105) = 110.25 acres. Assume that there are 14, 000 acres of land with 2, 500 acres uncut, and that the reforestation rate is 0.02.

Write a program that will prompt the user to enter the number of years to be used and print a table showing the number of acres reforested at the end of each year.

Explanation / Answer

#include <stdio.h>

int main()
{
int i,n;
double uncut=2500,r=0.02;
printf("enter the number of years to be used: ");
scanf("%d",&n);
printf("Initial uncut forest: %f ",uncut);
  
for(i=0;i<n;i++){
uncut=uncut+uncut*r;
printf("Forest after %d year: %f ",(i+1),uncut);
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote