1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Olegator [25]
3 years ago
11

5.11: Population Write a program that will predict the size of a population of organisms. The program should ask the user for th

e 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.
Engineering
1 answer:
fomenos3 years ago
4 0

Answer:

// using c++ language

#include "stdafx.h";

#include <iostream>

#include<cmath>

using namespace std;

//start

int main()

{

  //Declaration of variables in the program

  double start_organisms;

  double daily_increase;

  int days;

  double updated_organisms;

  //The user enters the number of organisms as desired

  cout << "Enter the starting number of organisms: ";

  cin >> start_organisms;

  //Validating input data

  while (start_organisms < 2)

  {

      cout << "The starting number of organisms must be at least 2.\n";

      cout << "Enter the starting number of organisms: ";

      cin >> start_organisms;

  }

  //The user enters daily input, here's where we apply the 5.2% given in question

  cout << "Enter the daily population increase: ";

  cin>> daily_increase;

  //Validating the increase

  while (daily_increase < 0)

  {

      cout << "The average daily population increase must be a positive value.\n ";

      cout << "Enter the daily population increase: ";

      cin >> daily_increase;

  }

  //The user enters number of days

  cout << "Enter the number of days: ";

  cin >> days;

  //Validating the number of days

  while (days<1)

  {

      cout << "The number of days must be at least 1.\n";

      cout << "Enter the number of days: ";

      cin >> days;

  }

 

  //Final calculation and display of results based on formulas

  for (int i = 0; i < days; i++)

  {

      updated_organisms = start_organisms + (daily_increase*start_organisms);

      cout << "On day " << i + 1 << " the population size was " << round(updated_organisms)<<"."<<"\n";

     

      start_organisms = updated_organisms;

  }

  system("pause");

   return 0;

//end

}

You might be interested in
On aircraft equipped with fuel pumps, when is the auxiliary electric driven pump used?.
pochemuha
In an airplane equipped with fuel pumps, the auxiliary electric fuel pump is used in the event the engine-driven fuel pump fails.. hope this helped !
6 0
2 years ago
4. A banking system provides users with several services:
VLD [36.1K]

A diagram showing a use case diagrams for these requirements is given in the image attached.

<h3>What is system Case diagram?</h3>

A use case diagram is known to be a kind of graphical illustration of a users in terms of their various possible association or interactions within any given system.

A use case diagram in banking can be used to prepare, depict and also to know all the functional requirements of the banking system.

Therefore, Give the use case specification for the banking system services and paying a bill online is given in the image attached.

Learn  more about Case diagram from

brainly.com/question/12975184

#SPJ1

4 0
2 years ago
What causes the moon to be illuminated? PLEASE HELP MEH ILL GIVE YOU BRAINLEIST!!
Likurg_2 [28]

Answer:

D Reflection

Explanation:

It reflects the light from the sun. Then when the earth gets in the way, it casts a shadow causing crescent moons.

7 0
2 years ago
Which of the following is a common use for commas?
andreyandreev [35.5K]

Answer:

connecting two independent clauses

4 0
3 years ago
Read 2 more answers
Which of the following explains why material properties present challenges for engineers?
Maurinko [17]

Answer:

Explanation:

They are altered by variables such as temperature hence making materials challenging when dealing with them.

4 0
4 years ago
Other questions:
  • 4.116 The lid of a roof scuttle weighs 75 lb. It is hinged at corners A and B and maintained in the desired position by a rod CD
    9·1 answer
  • There are two piston-cylinder systems that each contain 1 kg of an idea gas at a pressure of 300 kPa and temperature of 350 K. T
    8·1 answer
  • An ideal gas undergoes two processes: one frictionless and the other not. In both the cases, the gas is initially at 200 ℉ and 1
    7·2 answers
  • Refrigerant-134a enters a diffuser steadily as saturated vapor at 600 kPa with a velocity of 160 m/s, and it leaves at 700 kPa a
    10·2 answers
  • A room is cooled by circulating chilled water through a heat exchanger located in the room. The air is circulated through the he
    15·1 answer
  • The Cv factor for a valve is 48. Compute the head loss when 30 GPM of water passes through the valve.
    13·1 answer
  • 3. (20 points) Suppose we wish to search a linked list of length n, where each element contains a key k along with a hash value
    7·1 answer
  • Select the correct answer.
    8·1 answer
  • 6
    10·2 answers
  • He is going ___ in the hot air ballon​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!