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
Xelga [282]
3 years ago
6

Write a program that will predict the size of a population of organisms. The program // should ask the user for the starting num

ber of organisms, their average daily population // increase (as a percentage of the current population), and the number of days they will // multiply. A loop should display the size of the population for each day.
Computers and Technology
1 answer:
nordsb [41]3 years ago
7 0

Answer:

Following are the program in the C++ Programming Language:

#include <iostream>

using namespace std;

int main() {

 float starting, average;

 int num;

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

 while(!(std::cin >> starting)|| starting < 2){

   std::cout<<"starting number must be greater than 2\n";

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

   std::cin.clear();

   std::cin.ignore(123,'\n');

 }

 std::cout <<"Enter the average of daily population is increase %: ";

 while(!(std::cin >> average)|| average < 0){

   std::cout<<"Average must be greater than 0\n Enter average";

   std::cin.clear();

   std::cin.ignore(123,'\n');

 }

   average *= .01;

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

 while(!(std::cin >> num)|| num < 1){

   std::cout<<"Number of days no be less than 1\n" <<"Enterthe number of days\n";

   std::cin.clear();

   std::cin.ignore(123,'\n');

 }

 for(int i=0; i<num; i++){

   std::cout<<"population size of day"<<(i+1);

   std::cout<<": "<<starting<<std::endl;

   starting +=(starting*average);

 }

 return 0;

}

<u>Output</u>:

Enter starting number of the organisms: 4

Enter the average of daily population is increase %: 5

Enter the number of days: 4

population size of day1: 4

population size of day2: 4.2

population size of day3: 4.41

population size of day4: 4.6305

Explanation:

Here, we define header file "<iostream>" and namespace "std".

  • Then, we define the main() inside it, we set two float data type variable i.e., "starting", "average" and set an integer data type variable i.e., "num".
  • Then, we print a message and after that, we set the while loop for get input from the user in variable "starting" and pass the condition inside loop we print message than clear cin and ignore 123 then, we again do this to get  input from user in variable "average".
  • Then, we set the for loop and pass the condition inside the loop print the size of the day then print the value of "starting" after that we multiply.
  • Finally, we return 0 and close the main function.
You might be interested in
What does it mean "Be Proactive"?
joja [24]

Answer:controlling a situation by making things happen or by preparing for possible future problems

Explanation:

4 0
2 years ago
Read 2 more answers
True or false? If you’re posting the same content across different channels, make sure you post them simultaneously—on the same
alukav5142 [94]

Answer:

The answer is true.

Explanation:

7 0
3 years ago
_______________ are high-level statements made by management that lay out the organization’s position on some issue.
cricket20 [7]

Answer:

1. Policies

2. HVAC (Heating, Ventilation and Air Conditioning)

Explanation:

1. Policies are high-level statements made by management that lay out the organization’s position on some issue.

2. The collective term used to refer to the systems that are used to maintain the comfort of an office environment and that are often controlled by computer systems is HVAC (Heating, Ventilation and Air Conditioning)

7 0
3 years ago
Who is the president of USA​
myrzilka [38]

Currently it is Donald J. Trump but he is leaving office so it will be Joe Biden :^)

4 0
3 years ago
Read 2 more answers
A/An is useful in comparing data values from populations with different means and standard deviations.
Vsevolod [243]

A useful tool in comparing data values from populations with different means and standard deviations is z-score.

<h3>What is a Z-score?</h3>

This is known to be a kind of numerical measurement that tells a value's association to the mean of a group of values.

The Z-score is said to be measured in regards to standard deviations that arises from the mean.

Note that A useful tool in comparing data values from populations with different means and standard deviations is z-score.

Learn more about z-score from

brainly.com/question/25638875

#SPJ11

7 0
2 years ago
Other questions:
  • The type of database that uses fields, records, and measure as data attributes is
    7·1 answer
  • What does it mean when your check engine light comes on?
    7·1 answer
  • In 1-2 pages, identify a social networking technology and identify at least 10 security and/or privacy risks the technology has
    8·1 answer
  • How to get the home button on your screen?
    13·1 answer
  • The national highway system improved economic activity in Georgia by
    6·2 answers
  • A _____ are devices that permit a user to connect to a digital t-carrier service.
    6·1 answer
  • Free brainliest hehehehehehehheheh
    13·2 answers
  • Answered
    10·1 answer
  • Years ago when working a helpdesk, the most common question asked, almost daily, was about resetting passwords. What type of kno
    11·1 answer
  • Im trying to do an animation only using simplegui in python and my objective is make the ball enters frame, be confused and jump
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!