Skip to content

luc039.c

Problem Statement

Population of a town today is 100000. The population has increased steadily at the rate of 10% per year for last 10 years. Write a program to determine the population at the end of each year in the last decade.

Metadata

Property Detail
Author Amit Dutta (amitdutta4255@gmail.com)
License MIT

Actions

Raw View on GitHub

💡 You can print or save this file by opening Raw and using your browser.

Source Code

#include <stdio.h>
int main()
{
    int i, population = 100000;
    printf("Present year : %d\n", population);
    for (i = 1; i <= 10; i++)
    {
        population /= 1.10;
        printf("%d year ago : %d\n", i, population);
    }
    return 0;
}