I was wondering if someone would be able to give me a hint on how I would start this program. Any help help would be great. I know I am supposed to use arrays and/or pointers. The problem is as follows:
Letís investigate the way that population grows. We know that the changes in population
come from three sources: birth, death, and net immigration.
The number of births depends on the population and age distribution of the fecund women.
Letís model the number of births per year by women of age A by the expression F*[(13−|28−A|) /169.0 ]*W(A),
where F is the average number of children per woman, and W(A) is the population of women aged A, and where we assume that only women between age 16 and 40 will give birth. The total number of births is the sum of all these amounts, and we will split evenly between males and females.
The death rate depend on the age and sex of the population, and is dependent on two factors: childhood illnesses and old age. Letís model the childhood illness deaths by 0 if A is >=10 and CI [(10−A)/55.0 ]*P(A) for A < 10, where CI is the probability of dying from a childhood illness and P(A) is the population of each sex of age A [youíll have to handle the two sexes separately].
Letís also model the old age deaths by the smaller of P(A) and D *[A^2 /10000.0]* P(A), where D is a measure of the average life for a particular sex [so there are really two Dís, one for men and one for women].
The number of migrants also depends on age, but (weíll assume) not on sex. Letís model
the increase due to migration by M ∑ P(A) for ages between 20 and 40, and by (M/2) ∑ P(A) for ages between 0 and 19. [Again you will have to handle each sex separately.]
For your program, I want you to set aside two arrays: one for the male population and one
for the females, each one to range for ages from 0 to 100. Put 100 people of each sex into
each age from 0 to 40. Then read in the five floating values: F, CI, Dmale, Dfemale, and M
(in that order). Repeat the following 100 times:
compute the number of births (and store in a temporary variable)
for each sex, working from age 100 down to age 1, figure the new P(A) from P(A−1)
plus net immigration minus deaths from childhood illness and from old age
for each sex, the new P(0) is half the number of births
Finally print the two arrays.