This function takes as its parameters the current


f P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula:

P + (B * P)/100 - (D * P)/100

The population growth rate is given by the formula:

B - D

Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number f years. The program should then calculate and print the estimated population after n years. Your program must consist of the following functions:

a. growthRate: This function takes as its parameters the birth and death rate, and it returns the population growth rate.

b. estimatedPopuation: This function takes as its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years.

Your program should to accept a negative birth rate, negative death rate, or a population less than 2.

1539_Program_6B.jpg

Solution Preview :

Prepared by a verified Expert
Programming Languages: This function takes as its parameters the current
Reference No:- TGS01257333

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)