subject

Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage, expressed as a fraction in decimal form: for example 0.052 would mean a 5.2% increase each day), and the number of days they will multiply. A loop should display the size of the population for each day. Input Validation. Do not accept a number less than 2 for the starting size of the population. If the user fails to satisfy this print a line with this message "The starting number of organisms must be at least 2.", display the prompt again and try to read the value . Similarly, do not accept a negative number for average daily population increase , using the message "The average daily population increase must be a positive value ." and retrying. Finally, do not accept a number less than 1 for the number of days they will multiply and use the messag. The number of days must be at least 1.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
Which virus-infecting components are email messages prone to carry? one of the problems associated with the use of email communication is that email messages are prone to carry virus-infecting .
Answers: 3
question
Computers and Technology, 22.06.2019 14:40
You begin your first day of responsibilities by examining the recent is security breach at gearup to get ideas for safeguards you will take. at gearup, criminals accessed the company's improperly-secured wireless system and stole customers' credit card information as well as employee social security numbers. what kind of computer crime did gearup face?
Answers: 3
question
Computers and Technology, 22.06.2019 15:30
Whats are the different parts of no verbal comunication, especially body language?
Answers: 3
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
You know the right answer?
Write a program that will predict the size of a population of organisms. The program should ask the...
Questions
question
Mathematics, 05.10.2021 23:30
question
Biology, 05.10.2021 23:30
Questions on the website: 13722363