I am very new at c++ and need some help
here is the question:
Assume that there are 14000 acres total with 2500 acres uncut and that the reforestation rate is .02. Print a table showing the numbers of acres forested at the end of each year for a total of 20 years.
here is what I have so far:
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
//declare variables
int year;
double clear, forested, totalforested, growth;
//calculate the growth conversion
//write the table
cout << "Table showing the the number of acres"
" forested each year over 20 years" << endl
<< "Year \t\t Forested Acres" << endl << endl;
//write the loop
for (year = 1; year <= 20; year++)
{
//clear = 11500;
//forested = 2500;
totalforested = (clear * .02) + forested
(clear * .02) = growth
growth + forested = totalforested
clear - growth = clear
forested = totalforested
cout << year << totalforested << endl;
}
system("PAUSE");
return 0;
}
It is returning an error on line 31: forested cannot be used as a function
and on line 32: expected ';' before "growth"
any help is appreciated
thanks