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
While speech recognition can operate without any confi guration, you can train it to more accurately recognize your voice. true
Natasha_Volkova [10]
True because any one can change or fix their voice just by practicing a voice.
3 0
3 years ago
what term defines inventiveness uncertainty and futuristic ideas typically deals with science and technology
Kruka [31]

Answer:

Innovation.

Explanation:

Innovation can be considered the ideal term, because an innovative idea arises from the set of a new technique, method or invention that aims to improve an existing method, standard, or product.

However, added to an innovative idea is the risk, since innovation breaks an already established standard, so it is through science and technology that an invention will gain greater foundation and recognition, which increases its credibility and acceptance.

3 0
3 years ago
You use a cisco 2900 router in your network. you are considering purchasing and implementing the Unifield communications feature
Olenka [21]

Explanation:

License boot module c2900, technology-package uck9

7 0
3 years ago
Why should information technology NOT be taught in school?​
tatiyna

Explanation:

Technology should not be used to teach in school as it can lead to distractions. With kids wanting to explore other sights, cheating, and communicating with others. Also, it can be expensive to purchase the technology for everyone as it can be a major investment with hundreds or thousands going into it. Technology also requires a lot of training by having to adapt lessons compatible with the systems and making sure the software is secure.

5 0
3 years ago
The ____, or typeface, defines the appearance and shape of letters, numbers, and special characters.
Paladinen [302]
Font(s)
fonts is another word for typeface
the appearance of letters and numbers when you chang the font
5 0
3 years ago
Other questions:
  • HELP PLEASE
    7·2 answers
  • 1. The future of 2D animation does not include hand-drawing. (1 point)
    13·1 answer
  • In a computerized accounting system, each transaction that is analyzed must be entered by hand into the appropriate journal and
    12·2 answers
  • A _____ captures the pattern in a _____ and sends it to the computer, where special software translates the _____ into meaningfu
    8·1 answer
  • A computer that no longer works after having minor repair works done to it may have been damaged by
    8·2 answers
  • A device receives a Transmission Control Protocol (TCP) packet. The device understands where the actual data payload begins. Whi
    15·1 answer
  • Which one is not the future of wireless technology?
    8·1 answer
  • You need to write a program that calculates and displays the revenue earned from ticket sales at a movie theater. Input: Prompt
    11·1 answer
  • Assume you have an Access database with five different tables, including various pieces of information about your client base. Y
    9·1 answer
  • Overview
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!