bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

luc039.c (654B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* Population of a town today is 100000. The population has increased
      8 steadily at the rate of 10% per year for last 10 years. Write a
      9 program to determine the population at the end of each year in the
     10 last decade. */
     11 /* Let Us C, Chap- 6, Page - 106, Qn No.: B(f) */
     12 
     13 #include <stdio.h>
     14 int main()
     15 {
     16     int i, population = 100000;
     17     printf("Present year : %d\n", population);
     18     for (i = 1; i <= 10; i++)
     19     {
     20         population /= 1.10;
     21         printf("%d year ago : %d\n", i, population);
     22     }
     23     return 0;
     24 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror