Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Prompts, Output Labels and Messages.The three input data should be prompted for with the following prompts: "Enter the starting number organisms: ", "Enter the daily increase: ", and "Enter the number of days the organisms will multiply: " respectively. After the input has been read in successfully, a table is produced, for example:

-----------------------------

2            300.0

4            675.0

Under the heading is a line of 29 dashes followed by one line for each day, showing the day number and the population at the beginning of that 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 "Invalid. Must be at least 2. Re-enter: " and try to read the value. Similarly, do not accept a negative number for average daily population increase, using the message "Invalid. Enter a non-negative number: " and retrying. Finally, do not accept a number less than 1 for the number of days they will multiply and use the message "Invalid. Enter 1 or more: ".

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92529950
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question suppose that a car is moving through a suburban

Question : Suppose that a car is moving through a suburban environment that has a wireless channel with a coherence time of 10 ms and a coherence bandwidth of 600 kHz. The bit rate of the signal being used is 50 kbps. Ch ...

Search the internet for 5 open source reporting software

Search the internet for 5 open source reporting software packages of your choice? Explain why you think these software packages are the best for BI/DSS Reporting? Choose one of them and do associated with the reporting s ...

Suppose i am designing a personnel database for a

Suppose I am designing a personnel database for a university. The university has three types of personnel: students, staff, and faculty. Here are the characteristics of the three groups: -All three groups have a name and ...

Discuss how an enterprise architecture can establish

Discuss how an Enterprise Architecture can establish governance mechanisms?

Case description mama mias mm pizzeria offers pizzas

Case Description: Mama Mia's (MM) pizzeria offers pizzas, breadsticks, and Buffalo chicken wings for carry out customers only. Customers phone in the order and come by to pick up their order. When regular customers call ...

System analysis project 4 can you answer the 4 questions at

System Analysis project 4: can you answer the 4 questions at the task section, thank you. Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company ...

Question suppose a data packet datagram is sent in the

Question : Suppose a data packet (datagram) is sent in the Internet from a source station (computer) to a destination station. What type of addess (physical, MAC, port address or some other) is used to forward the datagr ...

How is the study of how firms decisions about prices and

How is the study of how firms' decisions about prices and quantities depend on the market conditions they face, the field of industrial organization, and the cost of production.

If there are 30 students total and 13 of them have blue

If there are 30 students total and 13 of them have blue socks and 17 have red socks. Randomly select a student from the class list. What is the probability of the student having red socks?

Suppose there are three decks of cards on the table a

Suppose there are three decks of cards on the table, a number is written on each card. And each deck is sorted in decreasing order (The maximum value is on the deck in top). The goal is to find the minimum value between ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As