First off, I'm new to this board and to C programming, but I have done some programming in VB. I am 5 weeks into a 10-week C class, and so far I've pretty well. So I am not completely lost. But I have come across a problem I don’t know how to tackle. I need to create a simple table showing the reforestation rate with a given amount of acreage (2500 acres) over a 20-year span at .02% rate. The formula is simple, 2500+(2500*.02). My problem is how to create an algorithm or method to calculate my reforestation rate for each year taking into account the previous years increase in acerage. I’ve created a program that does this, but it uses 20 While loops and 130 lines of code.
Help, Thanks in advance