0
I had to do this algorithm :
In 2010, a small Brazilian city has 20,000 inhabitants. The forecast of IBGE is that this city grows at a rate of 5% per year. Knowing of this, make an algorithm that prints on the screen the year and the population planned for the city in that year, with the year ranging from 2011 to 2030.
using the structure for
and I made this algorithm:
float populacao;
int conta,taxa,total;
populacao=20.000;
taxa=1.05;
for (conta=2011;conta<=2030;conta++)
{
total=populacao*taxa;
populacao=total;
printf("O ano de %d tera %f de habitantes \n",conta,populacao);
}
but the result of the population is giving 20.000000
for all the years,?