Answer to Question #331327 in C for shiva

Question #331327

A patient with first stage zombie virus has escaped from the facility in a city of population N. The zombie virus is very dangerous as it passes on to othr people as they come in contact with the patient makin them a petient as well. Zombie virus has K life stages to develop, each of which takes 1 unit of time. Only the last stage is contagious. A person with zombie attack only healthy people and can oly affect one person in 1 unit of time. If the patient escaped on day 1, find out the number of days it will take to wipe out the entire city's healthy population and turn them into a last stage zombie. Note: 1 unit of time is equal to 1 day.

i/p1: Total healthy population of the city

i/p2: No. of stages of zombie virus.

Ex1

i/p1:10

i/p2:1

o/p:5

Hence, on day2, the affected population will be 2 and so on. On day 5, the affected population will be 16 which is bigger than 10. Ex2

i/p1:10

i/p2:2

o/p:6 It takes 2 days for virus to evolve.


0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS