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
Which of these physical concepts is most important in civil engineering? A. energy transformations B. motion under gravity C. he
melamori03 [73]

Answer:

energy transformations

7 0
3 years ago
Thermal energy storage systems commonly involve a packed bed of solid spheres, through which a hot gas flows if the system is be
bonufazy [111]

Answer:

T =272.497degrees

%=34.08%

Explanation:

Please see attachment

4 0
4 years ago
Read 2 more answers
Document the XSS stored exploit script: Use the View Source feature of the web page and create a screenshot of the few lines cod
Natali [406]

Answer:

Hold on let me ask my brother

Explanation:

5 0
3 years ago
Help me with sudoku have fun with it. It is a brain stretcher
GREYUIT [131]

Answer:

I think you should do it yourself because it will help your brain please mark me as brainlist please

7 0
3 years ago
Why does the author introduce the grandmother with her comments about the Misfit? (paragraph 1)
zimovet [89]

Answer:

Grandmother has her opinions set in stone. Her early comments on the misfit are central to the irony of what actually unfolds. Despite her belief in Christian grace and forgiveness, her world will still implode.

Explanation:

hope this helped you (ㆁωㆁ)

7 0
4 years ago
Other questions:
  • A dipstick is (a direct,an indirect) measurement device
    13·1 answer
  • Atmospheric pressure is measured to be 14.769 psia. a. What would be the equivalent reading of a water barometer (inches of H20)
    11·1 answer
  • Carbon dioxide gas enters a well-insulated diffuser at 20 lbf/in.2 , 500R, with a velocity of 800 ft/s through a flow area of 1.
    14·1 answer
  • Terri Duncan recommends following up after an interview in which way?
    9·1 answer
  • What is the least common denominator for the fractions 16and34?
    10·2 answers
  • A robot with artificial intelligence would best be suited for
    11·1 answer
  • How many volts of electricity would it take to power up an entire city? Take Tokyo for example. Please explain!
    12·1 answer
  • Using leftover paint colors is acceptable in a paint shop and will help cut down on waste.
    13·2 answers
  • Why won't Brainly let me make a account or log in? It's always telling me that it can't take my registration at this time or it
    9·1 answer
  • Sort the following alphabets using MergeSort and give required steps. [2 Marks]
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!