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 message "the number of days must be at least 1."

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Jackson is teaching the decimal number system. he wants his students to know how to expand numbers by powers of 10. which is the correct order in which digits are assigned values in the decimal number system?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
Johnson enterprises uses a computer to handle its sales invoices. lately, business has been so good that it takes an extra 3 hours per night, plus every third saturday, to keep up with the volume of sales invoices. management is considering updating its computer with a faster model that would eliminate all of the overtime processing.
Answers: 2
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
English, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
French, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
French, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Mathematics, 10.09.2020 18:01
question
Social Studies, 10.09.2020 18:01
question
French, 10.09.2020 18:01
question
French, 10.09.2020 18:01
question
Geography, 10.09.2020 18:01
Questions on the website: 13722367