Respuesta :
Answer:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Population
{
class Program
{
static void Main(string[] args)
{
int currentYearPopulation,numberYears;
double growthRate,population;
population = 0.0;
Console.Write("Enter the current year population: ");
currentYearPopulation = Convert.ToInt32((Console.ReadLine()));
Console.Write("\nEnter the number of years: ");
numberYears = Convert.ToInt32(Console.ReadLine());
Console.Write("\nEnter the annual growth rate: ");
growthRate = Convert.ToDouble(Console.ReadLine());
population = currentYearPopulation;
Console.WriteLine("\n\nYear\tPopulation");
Console.WriteLine("------------------------");
for (int i = 1; i <= numberYears; i++)
{
Console.Write(i+"\t");
Console.WriteLine(Math.Round(population));
population = population + population * (growthRate/100);
}
Console.ReadKey();
}
}
}