static void Main(string[] args)
{
int population = 23962;
int totalNumberOfYears = 5;
double growthRate = 1.04;
Console.WriteLine("The population of Davidville is: {0}", newPopulation);
for(int year = 1; year < totalNumberOfYears; year++)
{
population = population * growthRate;
Console.WriteLine("The population of Davidville in year {0} is: {1}", year, newPopulation);
}
}
Try that, it should do the job.