In a region there is one birth every 40 seconds, one death every 95 seconds and one new arrival every 120 seconds. Population reads the current population and a number of years, and projects the population (a year has 365 days).
Declare the four rates and the number of seconds in a year as named constants (final). The yearly counts are whole numbers (integer division: a fraction of a birth does not count). For the input
9250000 5
the program prints
Seconds in a year: 31536000
Births per year: 788400
Deaths per year: 331957
Arrivals per year: 262800
Change per year: 719243
Population in 5 years: 12846215
The population is a long. Why is (long) changePerYear * years safer than changePerYear * years?