Question: Write this code in c ++ Write a program that calculates a prediction of change in population over a period (in years). The formula for
Write a program that calculates a prediction of change in population over a period (in years). The formula for calculating it is as follows: N=P+BPDP Where: - N-New population size - P-Previous population size - B-Birth Rate, represented as a percentage - D- Death Rate, represented as a percentage. Create a function that calculates the change in population. The function should accept P,B, and D and retum N. In main, write a loop that will produce an estimate for 10 years, assuming the following: Starting population: 500,000 Birth Rate: 5% Death Rate: 2.5%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
