> 1 5
> 2 5
> 3 5
Sheesh - what were you expecting???
Surely you must have realised by now that doing 100 * 0.05 will be 5 whether you do it once or 100 times.
Code:for (int i=1; i < years+1 ; ++i) { // does temp depend on the value of i - NO! // is temp going to change? - NO double temp = forest_rate * uncut_area; // what about this one then? area_forested = (uncut_area + temp * i); cout << i << " " << temp << endl; }