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
g A food department is kept at -12oC by a refrigerator in an environment at 30oC. The total heat gain to the food department is
boyakko [2]

Answer:

a) \dot W = 0.417\,kW, b) COP_{R} = 2.198, c) Irreversible.

Explanation:

a) The power input required by the refrigerator is:

\dot W = \dot Q_{H} - \dot Q_{L}

\dot W = \left(4800\,\frac{kJ}{h} - 3300\,\frac{kJ}{h}\right)\cdot \left(\frac{1}{3600} \,\frac{h}{s} \right)

\dot W = 0.417\,kW

b) The Coefficient of Performance of the refrigerator is:

COP_{R} = \frac{\dot Q_{L}}{\dot W}

COP_{R} = \frac{3300\,\frac{kJ}{h} }{(0.417\,kW)\cdot \left(3600\,\frac{s}{h} \right)}

COP_{R} = 2.198

c) The maximum ideal Coefficient of Performance of the refrigeration is given by the inverse Carnot's Cycle:

COP_{R,ideal} = \frac{T_{L}}{T_{H}-T_{L}}

COP_{R,ideal} = \frac{261.15\,K}{303.15\,K - 261.15\,K}

COP_{R,ideal} = 6.218

The refrigeration cycle is irreversible, as COP_{R} < COP_{R,ideal}.

3 0
3 years ago
Why doesn't any one give as many points as i do for random questions on brainly
erastova [34]

good question i like to give about 20. i think people just are cheapskates for most of their time on this planet. didnt need the 50 though but thanks.

4 0
2 years ago
Read 2 more answers
What are some "vital signs" that we consider to tell us about the economy?
Wittaler [7]

Explanation:

if there is a deficit or a surplus

if the budget is good

7 0
3 years ago
Read 2 more answers
on the same scale for stress, the tensile true stress-true strain curve is higher than the engineeringstress-engineering strain
Bess [88]

Answer:

The condition does not hold for a compression test

Explanation:

For a compression test the engineering stress - strain curve is higher than the actual stress-strain curve and this is because the force needed in compression is higher than the force needed during Tension.  The higher the force in compression leads to increase in the area therefore for the same scale of stress the there is more stress on the Engineering curve making it higher than the actual curve.

<em>Hence the condition of : on the same scale for stress, the tensile true stress-true strain curve is higher than the engineering stress-engineering strain curve.</em><em> </em>does not hold for compression test

5 0
3 years ago
Technician A says that a defective crankshaft position sensor can cause a no spark condition technician B says that a faulty ign
Aliun [14]
Both tech distributor ignition
5 0
3 years ago
Other questions:
  • Calculate the impedance of a 20 mH inductor at a frequency of 100 radians/s. Calculate the impedance of a 500 µF inductor at a f
    9·2 answers
  • Students are expected to respond to one of the two questions described below. Students should provide examples to clarify their
    12·1 answer
  • An inventor tries to sell you his new heat engine that takes in 40 J of heat at 87°C on each cycle, expels 30 J at 27°C, and doe
    14·1 answer
  • Consider a very long, cylindrical fin. The temperature of the fin at the tip and base are 25 °C and 50 °C, respectively. The dia
    14·1 answer
  • So far in your lifetime, about how much garbage have you contributed
    12·1 answer
  • What is a rivet and how do tehey work
    14·1 answer
  • Please help i will give brainilest
    12·2 answers
  • How to update android 4.4.2 to 5.1 if there isnt any update available​
    15·2 answers
  • Cup-sveg-aph<br><br>I m finding gf<br><br>if anyone interested pls come​
    11·2 answers
  • What subject is he......... now? Vietnamese.A. to learnB. learnC. learningD. learned
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!