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
On a cold winter day, wind at 55 km/hr is blowing parallel to a 4-m high and 10-m long wall of a house. If the air outside is at
koban [17]

Answer:

16.21 kW

Explanation:

Solution

Given that,

The velocity of wind = 55 km/hr

The length of the wall L = 10m

The height of the wall w = 4m

The surface temperature at wall Ts = 12° C

Temperature of air T∞ = 5°C

Now,

The properties  of the air at atm and average film temperature =( 12 + 5)/2 = 8.5°C, which is taken from the air table properties.

k= 0.02428 W/m°C

v= 1.413 *10 ^⁻5

Pr =0.7340

Now,

Recall Reynolds number when air flow parallel to 10 m side

[ 55 * 1000/3600) m/s (10 m)/1.413 *10^⁻5 m²/s

Rel =1.081 * 10⁷

This value is greater than Reynolds number.

The nusselt number is computed as follows:

Nu =hL/k

(0.037Rel^0.08 - 871)Pr^1/3

Nu =1.336 * 10 ^4

The heat transfer coefficient is

h = k/L Nu

= 0.2428 W/m°C /10 m (1.336 * 10 ^4)

h = 32.43 W/m°C

The heat transfer area of surface,

As = 40 m²

= ( 4 m) (10 m)

As = 40 m²

The rate of heat transfer is determined as follows:

Q = hAs( Ts - T∞)

= (32.43 W/m²°C) (40 m) (12 - 5)°C

=9081 W

Q = 9.08 kW

When the velocity is doubled,

let say V = 110km/hr

The Reynolds number is

Rel = VL/v

= [110 * 100/3600) m/s] (10 m)/ 1.413 *10^⁻5 m²/s

Rel = 2.163 * 10 ^7

This value is greater for critical Reynolds number

The nusselt number is computed as follows:

Nu =hL/k

(0.037Rel^0.08 - 871)Pr^1/3

[0.037 ( 2.163 * 10 ^7)^0.08 - 871] (0.7340)^1/3

Nu =2.344 * 10^4

The heat transfer coefficient is

h = k/L Nu

= 0.2428 W/m°C /10 m (2.384 * 10 ^4)

h= 57.88 W/m²°C

The heat transfer area of surface,

As =  wL

= ( 10 m) (4 m)

As = 40 m²

he rate of heat transfer is determined as follows:

Q = hAs( Ts - T∞)

= (57.88 W/m²°C) (40 m²) (12 - 5)°C

= 16,207 W

= 16.21 kW

3 0
3 years ago
: A pneumatic "cannon" is a device that launches a low mass projectile from a cylindrical tube using pressurized air stored upst
alukav5142 [94]

Answer:

Work done = 125π J

Explanation:

Given:

P = P_i * ( 1 - (x/d)^2 / 25)

d = 5.0 cm

x = 5 * d cm = 25d

Pi = 12 bar

Work done = integral ( F . dx )

F (x) = P(x) * A

F (x) =  (πd^2 / 4) * P_i * (1 - (x/d)^2 / 25)

Work done = integral ((πd^2 / 4) * P_i * (1 - (x/d)^2 / 25) ) . dx

For Limits 0 < x < 5d

Work done = (πd^2 / 4) * P_i  integral ( (1 - (x/d)^2) / 25)) . dx

Integrate the function wrt x

Work done = (πd^2 / 4) * P_i * ( x - d*(x/d)^3 / 75 )  

Evaluate Limits 0 < x < 5d :

Work done = (πd^2 / 4) * P_i * (5d - 5d / 3)

Work done = (πd^2 / 4) * P_i * (10*d / 3)

Work done = (5 π / 6)d^3 * P_i

Input the values:

Work done = (5 π / 6)(0.05)^3 * (1.2*10^6)

Work done = 125π J

5 0
2 years ago
Air enters a compressor steadily at the ambient conditions of 100 kPa and 22°C and leaves at 800 kPa. Heat is lost from the comp
telo118 [61]

Answer:

a) 358.8K

b) 181.1 kJ/kg.K

c) 0.0068 kJ/kg.K

Explanation:

Given:

P1 = 100kPa

P2= 800kPa

T1 = 22°C = 22+273 = 295K

q_out = 120 kJ/kg

∆S_air = 0.40 kJ/kg.k

T2 =??

a) Using the formula for change in entropy of air, we have:

∆S_air = c_p In \frac{T_2}{T_1} - Rln \frac{P_2}{P_1}

Let's take gas constant, Cp= 1.005 kJ/kg.K and R = 0.287 kJ/kg.K

Solving, we have:

[/tex] -0.40= (1.005)ln\frac{T_2}{295} ln\frac{800}{100}[/tex]

-0.40= 1.005(ln T_2 - 5.68697)- 0.5968

Solving for T2 we have:

T_2 = 5.8828

Taking the exponential on the equation (both sides), we have:

[/tex] T_2 = e^5^.^8^8^2^8 = 358.8K[/tex]

b) Work input to compressor:

w_in = c_p(T_2 - T_1)+q_out

w_in = 1.005(358.8 - 295)+120

= 184.1 kJ/kg

c) Entropy genered during this process, we use the expression;

Egen = ∆Eair + ∆Es

Where; Egen = generated entropy

∆Eair = Entropy change of air in compressor

∆Es = Entropy change in surrounding.

We need to first find ∆Es, since it is unknown.

Therefore ∆Es = \frac{q_out}{T_1}

\frac{120kJ/kg.k}{295K}

∆Es = 0.4068kJ/kg.k

Hence, entropy generated, Egen will be calculated as:

= -0.40 kJ/kg.K + 0.40608kJ/kg.K

= 0.0068kJ/kg.k

3 0
3 years ago
PLS HELP ME
Oksana_A [137]

Answer:

The Euler buckling load of a 160-cm-long column will be 1.33 times the Euler buckling load of an equivalent 120-cm-long column.

Explanation:

160 - 120 = 40

120 = 100

40 = X

40 x 100 / 120 = X

4000 / 120 = X

33.333 = X

120 = 100

160 = X

160 x 100 /120 = X

16000 / 120 = X

133.333 = X

4 0
2 years ago
In RSA Digital Signature, Suppose Bob wants to send a signed message (x = 4) to Alice. The first steps are exactly t eps are exa
Luda [366]

Answer:

what r u on

Explanation:

4 0
3 years ago
Other questions:
  • Liquid water enters a valve at 300 kPa and exits at 275 kPa. As water flows through the valve, the change in its temperature, st
    10·1 answer
  • What is the stress concentration factor of a shaft in torsion, where D=1.25 in. and d=1 in. and the fillet radius is, r=0.2 in.a
    7·1 answer
  • Estudio de caso Teorema de Bayes. Las historias de casos clínicos indican que diversas enfermedades producen sistemas similares.
    14·1 answer
  • A photovoltaic panel of dimension 2m×4m is installed on the
    14·1 answer
  • A 3-phase induction motor with 4 poles is being driven at 45 Hz and is running in its normal operating range. When connected to
    12·1 answer
  • A 1/4" nut driver with a 1.52 inch diameter handle is used to install a 14" 6 UNC
    13·1 answer
  • Advanced manufacturing does NOT serve the transportation, communications, or medical industries. Is this statement TRUE or FALSE
    11·2 answers
  • The condition where all forces acting on an object are balanced is called
    5·1 answer
  • Which step in the engineering design process does not come before building a<br> prototype?
    12·1 answer
  • Which of the given strategies is specifically a competitive advantage sustainment strategy?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!