bsc

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

root / semester_1 / letusc / luc039.c

luc039.c (518B)


      1 /* Population of a town today is 100000. The population has increased
      2 steadily at the rate of 10% per year for last 10 years. Write a
      3 program to determine the population at the end of each year in the
      4 last decade. */
      5 /* Let Us C, Chap- 6, Page - 106, Qn No.: B(f) */
      6 
      7 #include <stdio.h>
      8 int main()
      9 {
     10     int i, population = 100000;
     11     printf("Present year : %d\n", population);
     12     for (i = 1; i <= 10; i++)
     13     {
     14         population /= 1.10;
     15         printf("%d year ago : %d\n", i, population);
     16     }
     17     return 0;
     18 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror