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]
2 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:
fomenos2 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
Tech a says you should push the wrench when braking a fastener loose. Tech b says that you should pull the wrench when braking a
Kay [80]

Answer:

tech b because gut feeling

Explanation:

4 0
2 years ago
Water (density p-1000 is discharging from through a hole at the bottom of a graduated 71 cylinder. The mass flow rate exiting th
alexira [117]

Answer:

Please see attachment

Explanation:

Please see attachment

4 0
2 years ago
What is the definition of comma
masya89 [10]
Com·ma
/ˈkämə/
NOUN
1. a punctuation mark (,) indicating a pause between parts of a sentence. It is also used to separate items in a list and to mark the place of thousands in a large numeral.

2. a minute interval or difference of pitch.
5 0
2 years ago
Can someone tell me what car year and model this is please
Arlecino [84]

Answer:

i think 1844

Explanation:

5 0
3 years ago
Read 2 more answers
Most motor vehicle crashes in Florida in 2016 occurred on
vlada-n [284]
Most Motor Vehicle catches in Florida in 2016 occurred on Motorcycles. Another option could be roads.
4 0
3 years ago
Read 2 more answers
Other questions:
  • For the following gear train, if the blue gear is moving at 50 rpm, what are the speeds of the other gears?
    14·1 answer
  • A 450 MWt combined cycle plant has a Brayton cycle efficiency of 24% and a Rankine cycle efficiency of 29% with no heat augmenta
    6·1 answer
  • 5. What are the 3 basic types of electrical circuits?
    12·1 answer
  • Suppose the Bookstore is processing an input file containing the titles of books in order to remove duplicates from their list.
    8·1 answer
  • A common rule of thumb for controller discretization is to have "6 samples per rise time" in order to achieve a reasonable appro
    9·1 answer
  • 10. True or False: You should select your mechanic before you experience vehicle failure.
    6·2 answers
  • Which of the following is true of dead zones? a. They are formed when a volcanic eruption covers the soil with ash. b. They are
    15·1 answer
  • Di hola por 10 puntos
    8·1 answer
  • There are two methods to create simple robots. First, you can construct them by purchasing various individual components and ass
    15·1 answer
  • What are the horizontal structures beneath a slab that help transfer the load from the slab to the columns?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!