问题描述
这是我的作业,我无法做到,请帮助我。
我等待你的帮助
在行星Zephod上,绕着星座Betelgeuse运行,鲨鱼
以每天5%的孔雀鱼种群的比例增加,条件是每只鲨鱼有50只或更多的孔雀鱼。否则,鲨鱼以每天50%的速度死亡
。如果鲨鱼种群数量少于孔雀鱼种群数量的20%,那么孔雀鱼的每日增加率为80%/ b $ b。否则,孔雀鱼种群没有增加。
每只鲨鱼每天吃5只孔雀鱼。编写一个C程序,允许用户输入初始鲨鱼种群,最初的孔雀鱼种群数,
以及观察天数。该计划是每天输出人民币b $ b,直到他们中的一人死亡或者b
关闭或观察期结束。所有复制品
和死亡发生在一夜之间。任何分数鱼都被丢弃。 (这些
鲨鱼只在白天喂食。)
样品运行:
请输入鲨鱼数量:54
请输入孔雀鱼数量:1000
观察天数:15
每天开始1鲨鱼54孔雀鱼1000
一天结束1鲨鱼54孔雀鱼730
每天开始2鲨鱼27孔雀鱼1314
见
-
A. Sinan Unur< 1u ** @ llenroc.ude.invalid>
(删除.invalid并反转每个组件的电子邮件地址)
这是一种耻辱,分数鱼是最美味的。
S.
你吃的是密友吗?
S。
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 1sharks 54 guppies 1000
End of day 1sharks 54 guppies 730
Start of day 2sharks 27 guppies 1314
See
http://groups.google.com/group/comp....t=0&scoring=d&
--
A. Sinan Unur <1u**@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
This is a shame, the fractional fish are the tastiest.
S.
You eat chum?
S.
这篇关于这是我的HW,PLS帮助我!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!