D
Dj_TRuST
This is my homework and i couldn't do it,please help me.
I wait your helpsss
On the planet Zephod, which orbits the star Betelgeuse, the sharks
increase at a rate of 5% of the guppy population per day, provided
there are 50 or more guppies per shark. Otherwise, the sharks die off
at a rate of 50% per day. The guppies increase at a rate of 80% per
day, provided the shark population is less than 20 % of the guppy
population. Otherwise there is no increase in the guppy population.
Each shark eats 5 guppies a day. Write a C program that allows the user
to input the initial shark population, the initial guppy population,
and the number of days of observation is to cover. The program is to
output a day-by-day account of the populations until one of them dies
off or the end of the observation period is reached. All reproductions
and deaths occur overnight. Any fractional fish are discarded. (These
sharks only feed during the day.)
Sample run:
Please enter number of sharks: 54
Please enter number of guppies: 1000
Number of days to observe: 15
Start of day 1 sharks 54 guppies 1000
End of day 1 sharks 54 guppies 730
Start of day 2 sharks 27 guppies 1314
.
.
.
I wait your helpsss
On the planet Zephod, which orbits the star Betelgeuse, the sharks
increase at a rate of 5% of the guppy population per day, provided
there are 50 or more guppies per shark. Otherwise, the sharks die off
at a rate of 50% per day. The guppies increase at a rate of 80% per
day, provided the shark population is less than 20 % of the guppy
population. Otherwise there is no increase in the guppy population.
Each shark eats 5 guppies a day. Write a C program that allows the user
to input the initial shark population, the initial guppy population,
and the number of days of observation is to cover. The program is to
output a day-by-day account of the populations until one of them dies
off or the end of the observation period is reached. All reproductions
and deaths occur overnight. Any fractional fish are discarded. (These
sharks only feed during the day.)
Sample run:
Please enter number of sharks: 54
Please enter number of guppies: 1000
Number of days to observe: 15
Start of day 1 sharks 54 guppies 1000
End of day 1 sharks 54 guppies 730
Start of day 2 sharks 27 guppies 1314
.
.
.